diff options
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | uid.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/fetchmail.c b/fetchmail.c index dbd95ba2..63f9ef5c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1587,7 +1587,7 @@ static void dump_params (struct runctl *runp, if (ctl->server.protocol == P_POP3 #if INET6_ENABLE - && !strcmp(ctl->server.service, KPOP_PORT) + && ctl->server.service && !strcmp(ctl->server.service, KPOP_PORT) #else /* INET6_ENABLE */ && ctl->server.port == KPOP_PORT #endif /* INET6_ENABLE */ @@ -411,24 +411,24 @@ void expunge_uids(struct query *ctl) void uid_end_query(struct query *ctl) /* finish a query */ { - /* old state of mailbox is now irrelevant */ - free_str_list(&ctl->oldsaved); - free_str_list(&scratchlist); - ctl->oldsaved = ctl->newsaved; - ctl->newsaved = (struct idlist *) NULL; - /* debugging code */ if (ctl->server.uidl && outlevel >= O_DEBUG) { struct idlist *idp; report_build(stdout, "New UID list from %s:", ctl->server.pollname); - for (idp = ctl->oldsaved; idp; idp = idp->next) + for (idp = ctl->newsaved; idp; idp = idp->next) report_build(stdout, " %s = %d", idp->id, idp->val.status.mark); if (!idp) report_build(stdout, " <empty>"); report_complete(stdout, "\n"); } + + /* old state of mailbox may now be irrelevant */ + free_str_list(&ctl->oldsaved); + free_str_list(&scratchlist); + ctl->oldsaved = ctl->newsaved; + ctl->newsaved = (struct idlist *) NULL; } void write_saved_lists(struct query *hostlist, const char *idfile) |