[asterisk-commits] oej: branch 1.4 r62095 - in /branches/1.4: channels/chan_zap.c main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 27 01:10:44 MST 2007


Author: oej
Date: Fri Apr 27 03:10:43 2007
New Revision: 62095

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62095
Log:
Issue #9608  - fix some annoying DEBUG messages not controlled by option_debug (DEA). Thanks!

Modified:
    branches/1.4/channels/chan_zap.c
    branches/1.4/main/manager.c

Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=62095&r1=62094&r2=62095
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Fri Apr 27 03:10:43 2007
@@ -1399,7 +1399,8 @@
 		   Kill it. */
 		p->confno = -1;
 	}
-	ast_log(LOG_DEBUG, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
+	if (option_debug)
+		ast_log(LOG_DEBUG, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
 	return 0;
 }
 
@@ -1544,7 +1545,8 @@
 	g.chan = chan;
 	res = ioctl(fd, ZT_GETGAINS, &g);
 	if (res) {
-		ast_log(LOG_DEBUG, "Failed to read gains: %s\n", strerror(errno));
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Failed to read gains: %s\n", strerror(errno));
 		return res;
 	}
 
@@ -2440,7 +2442,8 @@
 	if (p->exten)
 		p->exten[0] = '\0';
 
-	ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
+	if (option_debug)
+		ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
 		p->channel, index, p->subs[SUB_REAL].zfd, p->subs[SUB_CALLWAIT].zfd, p->subs[SUB_THREEWAY].zfd);
 	p->ignoredtmf = 0;
 	
@@ -2867,7 +2870,8 @@
 		cp = (char *) data;
 		p->mate = 0;
 		if (!*cp) { /* turn it off */
-			ast_log(LOG_DEBUG, "Set option TDD MODE, value: OFF(0) on %s\n",chan->name);
+			if (option_debug)
+				ast_log(LOG_DEBUG, "Set option TDD MODE, value: OFF(0) on %s\n",chan->name);
 			if (p->tdd)
 				tdd_free(p->tdd);
 			p->tdd = 0;

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=62095&r1=62094&r2=62095
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Fri Apr 27 03:10:43 2007
@@ -1989,7 +1989,8 @@
 	int ret = 0;
 
 	ast_copy_string(action, astman_get_header(m, "Action"), sizeof(action));
-	ast_log( LOG_DEBUG, "Manager received command '%s'\n", action );
+	if (option_debug)
+		ast_log( LOG_DEBUG, "Manager received command '%s'\n", action );
 
 	if (ast_strlen_zero(action)) {
 		astman_send_error(s, m, "Missing action in request");



More information about the asterisk-commits mailing list