aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-04-26 08:04:47 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-04-26 08:04:47 +0000
commit951f5d539268a5c979aded90b2566bf40c3c51f3 (patch)
tree69f05458b14601bcf44f1043946904cc1dc0ba00
parentb2877c4407eec7beda1ce3d3afd3d87ee7d5d1e3 (diff)
downloadfetchmail-951f5d539268a5c979aded90b2566bf40c3c51f3.tar.gz
fetchmail-951f5d539268a5c979aded90b2566bf40c3c51f3.tar.bz2
fetchmail-951f5d539268a5c979aded90b2566bf40c3c51f3.zip
Quieter UID code.
svn path=/trunk/; revision=2457
-rw-r--r--uid.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/uid.c b/uid.c
index 106068e1..8cf753d0 100644
--- a/uid.c
+++ b/uid.c
@@ -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