diff src/dnsbl.cpp @ 225:8e1cbf3d96fc stable-6-0-20

simple dns lookup failure need not kill the resolver process
author Carl Byington <carl@five-ten-sg.com>
date Mon, 29 Dec 2008 18:12:22 -0800
parents da9e7f1c8160
children 3fee608becbc
line wrap: on
line diff
--- a/src/dnsbl.cpp	Sun Dec 28 09:27:58 2008 -0800
+++ b/src/dnsbl.cpp	Mon Dec 29 18:12:22 2008 -0800
@@ -612,7 +612,8 @@
         snprintf(text, sizeof(text), "dns_interface() wrote question %s and has answer length %d", question, glom.length);
         my_syslog(text);
     #endif
-    if ((glom.length == 0) || (glom.length > sizeof(glom.answer))) {
+    if (glom.length == 0) return 0;
+    if (glom.length > sizeof(glom.answer)) {
         priv.err = true;
         return 0;  // cannot process overlarge answers
     }