aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authormogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-03 15:53:07 +0000
committermogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-03 15:53:07 +0000
commit4a1aaf52ae4189e660ad57ba69253f54603a2beb (patch)
tree27a80e26cf8f6ea1728ab5b2b8cc7573fd9f7cdc /res/res_agi.c
parent1bd1494da59a95dce73628aafc4ba892036b82b2 (diff)
bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
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 {