[asterisk-commits] russell: branch 1.4 r85548 - /branches/1.4/main/db.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 15 08:16:24 CDT 2007


Author: russell
Date: Mon Oct 15 08:16:23 2007
New Revision: 85548

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85548
Log:
Suppress a LOG_DEBUG message if debug is not enabled.

(closes issue #10980)
Reported by: casper
Patches: 
      db.c.84633.diff uploaded by casper (license 55)

Modified:
    branches/1.4/main/db.c

Modified: branches/1.4/main/db.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/db.c?view=diff&rev=85548&r1=85547&r2=85548
==============================================================================
--- branches/1.4/main/db.c (original)
+++ branches/1.4/main/db.c Mon Oct 15 08:16:23 2007
@@ -194,7 +194,8 @@
 
 	/* Be sure to NULL terminate our data either way */
 	if (res) {
-		ast_log(LOG_DEBUG, "Unable to find key '%s' in family '%s'\n", keys, family);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Unable to find key '%s' in family '%s'\n", keys, family);
 	} else {
 #if 0
 		printf("Got value of size %d\n", data.size);
@@ -232,7 +233,7 @@
 	
 	ast_mutex_unlock(&dblock);
 
-	if (res) 
+	if (res && option_debug)
 		ast_log(LOG_DEBUG, "Unable to find key '%s' in family '%s'\n", keys, family);
 	return res;
 }




More information about the asterisk-commits mailing list