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);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to