[Asterisk-cvs] asterisk/channels chan_sip.c,1.841,1.842

kpfleming kpfleming
Wed Sep 7 16:54:00 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv31388/channels

Modified Files:
	chan_sip.c 
Log Message:
ensure debug messages are only output if debug is enabled (issue #5142)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.841
retrieving revision 1.842
diff -u -d -r1.841 -r1.842
--- chan_sip.c	7 Sep 2005 19:00:31 -0000	1.841
+++ chan_sip.c	7 Sep 2005 20:54:19 -0000	1.842
@@ -2142,7 +2142,9 @@
 			} else {
 				*inuse = 0;
 			}
-			ast_log(LOG_ERROR, "Call %s %s '%s' removed from call limit %d\n", outgoing ? "to" : "from", u ? "user":"peer", name, *call_limit);
+			if (option_debug > 1 || sipdebug) {
+				ast_log(LOG_DEBUG, "Call %s %s '%s' removed from call limit %d\n", outgoing ? "to" : "from", u ? "user":"peer", name, *call_limit);
+			}
 			break;
 		case INC_CALL_LIMIT:
 			if (*call_limit > 0 ) {
@@ -2160,7 +2162,9 @@
 				}
 			}
 			(*inuse)++;
-			ast_log(LOG_DEBUG, "Call %s %s '%s' is %d out of %d\n", outgoing ? "to" : "from", u ? "user":"peer", name, *inuse, *call_limit);
+			if (option_debug > 1 || sipdebug) {
+				ast_log(LOG_DEBUG, "Call %s %s '%s' is %d out of %d\n", outgoing ? "to" : "from", u ? "user":"peer", name, *inuse, *call_limit);
+			}
 			break;
 		default:
 			ast_log(LOG_ERROR, "update_call_counter(%s, %d) called with no event!\n", name, event);




More information about the svn-commits mailing list