Fix crash in conf, improves debug logging for rbl.
[apps/pfixtools.git] / common / rbl.c
index 11ed464..0ae4979 100644 (file)
 
 static inline rbl_result_t rbl_dns_check(const char *hostname)
 {
+    debug("looking up for %s", hostname);
     struct hostent *host = gethostbyname(hostname);
     if (host != NULL) {
+        debug("host found");
         return RBL_FOUND;
     } else {
         if (h_errno == HOST_NOT_FOUND) {
+            debug("host not found: %s", hostname);
             return RBL_NOTFOUND;
         }
+        debug("dns error: %m");
         return RBL_ERROR;
     }
 }