aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-06-05 05:50:59 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-06-05 05:50:59 +0000
commit8599e7830147b038319b8a144a9582062e83edfd (patch)
treec1560fa324105372ea47fc291a3b4503c2c993ba /conf.c
parent24f5685b15ad4cc3bbb6ba0ad2d2c8a6537c4314 (diff)
downloadfetchmail-8599e7830147b038319b8a144a9582062e83edfd.tar.gz
fetchmail-8599e7830147b038319b8a144a9582062e83edfd.tar.bz2
fetchmail-8599e7830147b038319b8a144a9582062e83edfd.zip
Better configuration dumping.
svn path=/trunk/; revision=1904
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/conf.c b/conf.c
index fcf76463..3e683d89 100644
--- a/conf.c
+++ b/conf.c
@@ -151,29 +151,31 @@ void dump_config(struct runctl *runp, struct query *querylist)
for (ctl = querylist; ctl; ctl = ctl->next)
{
/*
- * Every time we see a leading server entry after the first one,
- * it implicitly ends the both (q) the list of user structures
- * associated with the previous entry, and (b) that previous entry.
- */
- if (ctl > querylist)
- {
- indent(']');
- indent('}');
- indent('\0');
- putc(',', stdout);
- putc('\n', stdout);
- }
-
- indent(0);
- fprintf(stdout,"# Entry for site `%s' begins:\n",ctl->server.pollname);
- indent('{');
-
- /*
* First, the server stuff.
*/
if (!ctl->server.lead_server)
{
- flag using_kpop =
+ flag using_kpop;
+
+ /*
+ * Every time we see a leading server entry after the first one,
+ * it implicitly ends the both (a) the list of user structures
+ * associated with the previous entry, and (b) that previous entry.
+ */
+ if (ctl > querylist)
+ {
+ indent(']');
+ indent('}');
+ indent('\0');
+ putc(',', stdout);
+ putc('\n', stdout);
+ }
+
+ indent(0);
+ fprintf(stdout,"# Entry for site `%s' begins:\n",ctl->server.pollname);
+ indent('{');
+
+ using_kpop =
(ctl->server.protocol == P_POP3 &&
ctl->server.port == KPOP_PORT &&
ctl->server.preauthenticate == A_KERBEROS_V4);
@@ -268,6 +270,8 @@ void dump_config(struct runctl *runp, struct query *querylist)
listdump("mailboxes", ctl->mailboxes);
indent('}');
+ indent('\0');
+ fputc(',', stdout);
}
/* end last span of user entries and last server entry */