diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2016-12-12 02:55:20 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2016-12-12 02:55:20 +0100 |
commit | a3c08a3c2eb026a582575dee047f13781d1d4d83 (patch) | |
tree | 8948755a6dd83085ab67c406bf6e4ee8bd38e535 /fetchmail.c | |
parent | 00772c13773cb20747fb7a1d590218cd46646b82 (diff) | |
parent | 0aeab1198903075c1e4d1cee5dda2322d22a7955 (diff) | |
download | fetchmail-a3c08a3c2eb026a582575dee047f13781d1d4d83.tar.gz fetchmail-a3c08a3c2eb026a582575dee047f13781d1d4d83.tar.bz2 fetchmail-a3c08a3c2eb026a582575dee047f13781d1d4d83.zip |
Merge branch 'uidl-speedup-n-log-n-64' into legacy_64
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/fetchmail.c b/fetchmail.c index 8b0a5c3d..bcd13a50 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1597,6 +1597,14 @@ static int query_host(struct query *ctl) return(st); } +static int print_id_of(struct uid_db_record *rec, void *unused) +{ + (void)unused; + + printf("\t%s\n", rec->id); + return 0; +} + static void dump_params (struct runctl *runp, struct query *querylist, flag implicit) /* display query parameters in English */ @@ -2000,20 +2008,14 @@ static void dump_params (struct runctl *runp, if (ctl->server.protocol > P_POP2 && MAILBOX_PROTOCOL(ctl)) { - if (!ctl->oldsaved) + int count; + + if (!(count = uid_db_n_records(&ctl->oldsaved))) printf(GT_(" No UIDs saved from this host.\n")); else { - struct idlist *idp; - int count = 0; - - for (idp = ctl->oldsaved; idp; idp = idp->next) - ++count; - printf(GT_(" %d UIDs saved.\n"), count); - if (outlevel >= O_VERBOSE) - for (idp = ctl->oldsaved; idp; idp = idp->next) - printf("\t%s\n", idp->id); + traverse_uid_db(&ctl->oldsaved, print_id_of, NULL); } } |