diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-04-26 08:04:47 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-04-26 08:04:47 +0000 |
commit | 951f5d539268a5c979aded90b2566bf40c3c51f3 (patch) | |
tree | 69f05458b14601bcf44f1043946904cc1dc0ba00 /uid.c | |
parent | b2877c4407eec7beda1ce3d3afd3d87ee7d5d1e3 (diff) | |
download | fetchmail-951f5d539268a5c979aded90b2566bf40c3c51f3.tar.gz fetchmail-951f5d539268a5c979aded90b2566bf40c3c51f3.tar.bz2 fetchmail-951f5d539268a5c979aded90b2566bf40c3c51f3.zip |
Quieter UID code.
svn path=/trunk/; revision=2457
Diffstat (limited to 'uid.c')
-rw-r--r-- | uid.c | 42 |
1 files changed, 24 insertions, 18 deletions
@@ -109,23 +109,29 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile) if (outlevel >= O_DEBUG) { struct idlist *idp; + int uidlcount = 0; for (ctl = hostlist; ctl; ctl = ctl->next) + if (ctl->server.uidl) + { + report_build(stdout, "Old UID list from %s:",ctl->server.pollname); + for (idp = ctl->oldsaved; idp; idp = idp->next) + report_build(stdout, " %s", idp->id); + if (!idp) + report_build(stdout, " <empty>"); + report_complete(stdout, "\n"); + uidlcount++; + } + + if (uidlcount) { - report(stdout, "Old UID list from %s:", ctl->server.truename); - for (idp = ctl->oldsaved; idp; idp = idp->next) - report(stdout, " %s", idp->id); + report_build(stdout, "Scratch list of UIDs:"); + for (idp = scratchlist; idp; idp = idp->next) + report_build(stdout, " %s", idp->id); if (!idp) - report(stdout, "<empty>"); - report(stdout, "\n"); + report_build(stdout, " <empty>"); + report_complete(stdout, "\n"); } - - report(stdout, "Scratch list of UIDs:"); - for (idp = scratchlist; idp; idp = idp->next) - report(stdout, " %s", idp->id); - if (!idp) - report(stdout, "<empty>"); - report(stdout, "\n"); } } #endif /* POP3_ENABLE */ @@ -329,16 +335,16 @@ void update_str_lists(struct query *ctl) ctl->oldsaved = ctl->newsaved; ctl->newsaved = (struct idlist *) NULL; - if (outlevel >= O_DEBUG) + if (ctl->server.uidl && outlevel >= O_DEBUG) { struct idlist *idp; - report(stdout, "New UID list from %s:", ctl->server.truename); + report_build(stdout, "New UID list from %s:", ctl->server.pollname); for (idp = ctl->oldsaved; idp; idp = idp->next) - report(stdout, " %s = %d", idp->id, idp->val.status.mark); + report_build(stdout, " %s = %d", idp->id, idp->val.status.mark); if (!idp) - report(stdout, "<empty>"); - report(stdout, "\n"); + report_build(stdout, " <empty>"); + report_complete(stdout, "\n"); } } @@ -361,7 +367,7 @@ void write_saved_lists(struct query *hostlist, const char *idfile) if (!idcount) { if (outlevel >= O_DEBUG) - report(stdout, "Deleting fetchids file."); + report(stdout, "Deleting fetchids file.\n"); unlink(idfile); } else |