diff options
author | Joshua Colp <jcolp@digium.com> | 2007-09-10 13:41:54 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-09-10 13:41:54 +0000 |
commit | 7cb698fb31aaa95e80b5e785c5764dbc99bd0aa4 (patch) | |
tree | 6c344553c2fb32296dd7dc048cf47811754d5eeb /res | |
parent | d004349b83cb591a2963dbfbbb5c0081d360bd80 (diff) |
(closes issue #10684)
Reported by: junky
Patches:
debug.diff uploaded by junky (license 177)
Fix issue with debug always showing up.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_agi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index d356156d3..181fba1bd 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -581,9 +581,10 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char if (!(fs = ast_openstream(chan, argv[2], chan->language))) { ast_agi_fdprintf(agi->fd, "200 result=%d endpos=%ld\n", 0, sample_offset); return RESULT_SUCCESS; - } - vfs = ast_openvstream(chan, argv[2], chan->language); - ast_debug(vfs && 1, "Ooh, found a video stream, too\n"); + } + + if ((vfs = ast_openvstream(chan, argv[2], chan->language))) + ast_debug(1, "Ooh, found a video stream, too\n"); ast_verb(3, "Playing '%s' (escape_digits=%s) (sample_offset %ld)\n", argv[2], edigits, sample_offset); @@ -637,8 +638,9 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char * ast_log(LOG_WARNING, "Unable to open %s\n", argv[2]); return RESULT_SUCCESS; } - vfs = ast_openvstream(chan, argv[2], chan->language); - ast_debug(vfs && 1, "Ooh, found a video stream, too\n"); + + if ((vfs = ast_openvstream(chan, argv[2], chan->language))) + ast_debug(1, "Ooh, found a video stream, too\n"); ast_verb(3, "Playing '%s' (escape_digits=%s) (timeout %d)\n", argv[2], edigits, timeout); |