diff options
author | Matt O'Gorman <mogorman@digium.com> | 2006-10-03 15:53:07 +0000 |
---|---|---|
committer | Matt O'Gorman <mogorman@digium.com> | 2006-10-03 15:53:07 +0000 |
commit | ae8cc3e18be72c2e074ed33d7cfdc172f8e5f3b1 (patch) | |
tree | 27a80e26cf8f6ea1728ab5b2b8cc7573fd9f7cdc /channels/chan_gtalk.c | |
parent | c9c161350343720c2e5f41069c397933c7cbcc56 (diff) |
bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_gtalk.c')
-rw-r--r-- | channels/chan_gtalk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 9346d5ce8..c5a8483e4 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -597,7 +597,8 @@ static int gtalk_is_answered(struct gtalk *client, ikspak *pak) { struct gtalk_pvt *tmp; char *from; - ast_log(LOG_DEBUG, "The client is %s\n", client->name); + if (option_debug) + ast_log(LOG_DEBUG, "The client is %s\n", client->name); /* Make sure our new call doesn't exist yet */ for (tmp = client->p; tmp; tmp = tmp->next) { if (iks_find_with_attrib(pak->x, "session", "id", tmp->sid)) @@ -675,7 +676,8 @@ static int gtalk_hangup_farend(struct gtalk *client, ikspak *pak) struct gtalk_pvt *tmp; char *from; - ast_log(LOG_DEBUG, "The client is %s\n", client->name); + if (option_debug) + ast_log(LOG_DEBUG, "The client is %s\n", client->name); /* Make sure our new call doesn't exist yet */ for (tmp = client->p; tmp; tmp = tmp->next) { if (iks_find_with_attrib(pak->x, "session", "id", tmp->sid)) @@ -1239,7 +1241,8 @@ static struct ast_frame *gtalk_rtp_read(struct ast_channel *ast, struct gtalk_pv /* if ((ast_test_flag(p, SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) { f = ast_dsp_process(p->owner, p->vad, f); if (option_debug && f && (f->frametype == AST_FRAME_DTMF)) - ast_log(LOG_DEBUG, "* Detected inband DTMF '%c'\n", f->subclass); + if (option_debug) + ast_log(LOG_DEBUG, "* Detected inband DTMF '%c'\n", f->subclass); } */ } } |