diff src/dnsbl.cpp @ 123:ecd97e7eb1f0 stable-5-15

properly return error code with reject reason
author carl
date Wed, 15 Mar 2006 08:21:51 -0800
parents 1d9e6c1b8872
children ea6f9c812faa
line wrap: on
line diff
--- a/src/dnsbl.cpp	Mon Mar 13 08:45:54 2006 -0800
+++ b/src/dnsbl.cpp	Wed Mar 15 08:21:51 2006 -0800
@@ -995,12 +995,12 @@
 		}
 		bool rejecting = alive.empty(); // if alive is empty, we must have set msg above in acceptable_content()
 		if (!rejecting) {
-			char *msg;
-			if (check_hosts(priv, random, limit, msg, host, ip)) {
+			char *fmt;
+			if (check_hosts(priv, random, limit, fmt, host, ip)) {
 				char adr[sizeof "255.255.255.255"];
 				adr[0] = '\0';
 				inet_ntop(AF_INET, (const u_char *)&ip, adr, sizeof(adr));
-				snprintf(buf, sizeof(buf), msg, host, adr);
+				snprintf(buf, sizeof(buf), fmt, host, adr);
 				msg = buf;
 				rejecting = true;
 			}