aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-07 20:54:19 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-07 20:54:19 +0000
commitb32dc41f8f95c9f48bf3bf93a215e8580a8dd163 (patch)
tree03dc7989f4646bb7b76f2fc43a896c3be333da13
parent8e3c1d8838bb6f26faf1726bfa00f297343ca696 (diff)
ensure debug messages are only output if debug is enabled (issue #5142)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6539 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/chan_sip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f14ea507d..9527ebc93 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2142,7 +2142,9 @@ static int update_call_counter(struct sip_pvt *fup, int event)
} 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 @@ static int update_call_counter(struct sip_pvt *fup, int event)
}
}
(*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);