[asterisk-commits] oej: branch 1.4 r53672 - /branches/1.4/main/acl.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 8 16:18:59 MST 2007


Author: oej
Date: Thu Feb  8 17:18:59 2007
New Revision: 53672

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53672
Log:
Don't output debug unless we asked for it

Modified:
    branches/1.4/main/acl.c

Modified: branches/1.4/main/acl.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/acl.c?view=diff&rev=53672&r1=53671&r2=53672
==============================================================================
--- branches/1.4/main/acl.c (original)
+++ branches/1.4/main/acl.c Thu Feb  8 17:18:59 2007
@@ -196,7 +196,8 @@
 			ret = ha;
 		}
 	}
-	ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n", stuff, nm);
+	if (option_debug)
+		ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n", stuff, nm);
 	return ret;
 }
 
@@ -210,7 +211,8 @@
 		/* DEBUG */
 		ast_copy_string(iabuf, ast_inet_ntoa(sin->sin_addr), sizeof(iabuf));
 		ast_copy_string(iabuf2, ast_inet_ntoa(ha->netaddr), sizeof(iabuf2));
-		ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2);
 		/* For each rule, if this address and the netmask = the net address
 		   apply the current rule */
 		if ((sin->sin_addr.s_addr & ha->netmask.s_addr) == ha->netaddr.s_addr)



More information about the asterisk-commits mailing list