]> Pileus Git - ~andy/fetchmail/commitdiff
Dump antispam field as string, not list.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 23 Jul 1998 07:39:07 +0000 (07:39 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 23 Jul 1998 07:39:07 +0000 (07:39 -0000)
svn path=/trunk/; revision=2015

conf.c

diff --git a/conf.c b/conf.c
index b98ac1d06366d07ed8aa99803b132391117052b7..1ccbecf40d4b9a5a1b4628023b6f283590f7f9fa 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -270,14 +270,21 @@ void dump_config(struct runctl *runp, struct query *querylist)
        numdump("expunge", ctl->expunge);
        listdump("smtphunt", ctl->smtphunt);
        stringdump("smtpaddress", ctl->smtpaddress);
-       fprintf(stdout, "'antispam':[");
-       for (idp = ctl->antispam; idp; idp = idp->next)
+
+       indent('\0');
+       fprintf(stdout, "'antispam:'");
+       if (!ctl->antispam)
+           fputs("'\n", stdout);
+       else
        {
-           fprintf(stdout, "%d", idp->val.status.num);
-           if (idp->next)
-               fputs(", ", stdout);
+           for (idp = ctl->antispam; idp; idp = idp->next)
+           {
+               fprintf(stdout, "%d", idp->val.status.num);
+               if (idp->next)
+                   fputs(" ", stdout);
+           }
+           fputs("',\n", stdout);
        }
-       fputs("],\n", stdout);
        listdump("mailboxes", ctl->mailboxes);
 
        indent('}');