[asterisk-commits] file: trunk r82076 - /trunk/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 10 08:41:54 CDT 2007


Author: file
Date: Mon Sep 10 08:41:54 2007
New Revision: 82076

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82076
Log:
(closes issue #10684)
Reported by: junky
Patches:
      debug.diff uploaded by junky (license 177)
Fix issue with debug always showing up.

Modified:
    trunk/res/res_agi.c

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?view=diff&rev=82076&r1=82075&r2=82076
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Mon Sep 10 08:41:54 2007
@@ -581,9 +581,10 @@
 	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 @@
 		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);
 




More information about the asterisk-commits mailing list