summaryrefslogtreecommitdiff
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorMatt O'Gorman <mogorman@digium.com>2006-10-03 15:53:07 +0000
committerMatt O'Gorman <mogorman@digium.com>2006-10-03 15:53:07 +0000
commitae8cc3e18be72c2e074ed33d7cfdc172f8e5f3b1 (patch)
tree27a80e26cf8f6ea1728ab5b2b8cc7573fd9f7cdc /res/res_agi.c
parentc9c161350343720c2e5f41069c397933c7cbcc56 (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 'res/res_agi.c')
-rw-r--r--res/res_agi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index e38cef2c2..f6adf290e 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -563,7 +563,7 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char
return RESULT_SUCCESS;
}
vfs = ast_openvstream(chan, argv[2], chan->language);
- if (vfs)
+ if (vfs && option_debug)
ast_log(LOG_DEBUG, "Ooh, found a video stream, too\n");
if (option_verbose > 2)
@@ -628,7 +628,7 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char *
return RESULT_SUCCESS;
}
vfs = ast_openvstream(chan, argv[2], chan->language);
- if (vfs)
+ if (vfs && option_debug)
ast_log(LOG_DEBUG, "Ooh, found a video stream, too\n");
if (option_verbose > 2)
@@ -1840,7 +1840,8 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi
/* Idle the channel until we get a command */
f = ast_read(c);
if (!f) {
- ast_log(LOG_DEBUG, "%s hungup\n", chan->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "%s hungup\n", chan->name);
returnstatus = AGI_RESULT_HANGUP;
break;
} else {