diff src/dnsbl.cpp @ 5:793ac9cc114d stable-1-0

updates to use dcc conf files
author carl
date Wed, 21 Apr 2004 16:09:07 -0700
parents 15a7e942adec
children dbe18921f741
line wrap: on
line diff
--- a/src/dnsbl.cpp	Wed Apr 21 12:52:29 2004 -0700
+++ b/src/dnsbl.cpp	Wed Apr 21 16:09:07 2004 -0700
@@ -495,6 +495,9 @@
 
 static void dumpit(CONFIG &dc);
 static void dumpit(CONFIG &dc) {
+    dumpit(dc.env_from);
+    dumpit("envelope to (dnsbl list)", dc.env_to_dnsbll);
+    dumpit("envelope to (from map)", dc.env_to_chkfrom);
     fprintf(stderr, "\ndnsbls\n");
     for (dnsblp_map::iterator i=dc.dnsbls.begin(); i!=dc.dnsbls.end(); i++) {
         fprintf(stderr, "%s %s %s\n", (*i).first, (*i).second->suffix, (*i).second->message);
@@ -858,6 +861,13 @@
                 exit(EX_USAGE);
         }
     }
+
+    if (check) {
+        CONFIG &dc = *new_conf();
+        dumpit(dc);
+        return 0;
+    }
+
     if (!setconn) {
         fprintf(stderr, "%s: Missing required -p argument\n", argv[0]);
         usage(argv[0]);
@@ -868,15 +878,6 @@
         exit(EX_UNAVAILABLE);
     }
 
-    if (check) {
-        CONFIG &dc = *new_conf();
-        dumpit(dc.env_from);
-        dumpit("envelope to (dnsbl list)", dc.env_to_dnsbll);
-        dumpit("envelope to (from map)", dc.env_to_chkfrom);
-        dumpit(dc);
-        return 0;
-    }
-
     // switch to background mode
     if (daemon(1,0) < 0) {
         fprintf(stderr, "daemon() call failed\n");