[asterisk-commits] oej: trunk r338377 - /trunk/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 29 04:32:37 CDT 2011


Author: oej
Date: Thu Sep 29 04:32:34 2011
New Revision: 338377

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=338377
Log:
Just formatting.

Modified:
    trunk/res/res_agi.c

Modified: trunk/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_agi.c?view=diff&rev=338377&r1=338376&r2=338377
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Thu Sep 29 04:32:34 2011
@@ -1935,22 +1935,26 @@
 	long sample_offset = 0, max_length;
 	const char *edigits = "";
 
-	if (argc < 4 || argc > 5)
-		return RESULT_SHOWUSAGE;
-
-	if (argv[3])
+	if (argc < 4 || argc > 5) {
+		return RESULT_SHOWUSAGE;
+	}
+
+	if (argv[3]) {
 		edigits = argv[3];
-
-	if ((argc > 4) && (sscanf(argv[4], "%30ld", &sample_offset) != 1))
-		return RESULT_SHOWUSAGE;
+	}
+
+	if ((argc > 4) && (sscanf(argv[4], "%30ld", &sample_offset) != 1)) {
+		return RESULT_SHOWUSAGE;
+	}
 
 	if (!(fs = ast_openstream(chan, argv[2], chan->language))) {
 		ast_agi_send(agi->fd, chan, "200 result=%d endpos=%ld\n", 0, sample_offset);
 		return RESULT_SUCCESS;
 	}
 
-	if ((vfs = ast_openvstream(chan, argv[2], chan->language)))
+	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);
 
@@ -1958,11 +1962,13 @@
 	max_length = ast_tellstream(fs);
 	ast_seekstream(fs, sample_offset, SEEK_SET);
 	res = ast_applystream(chan, fs);
-	if (vfs)
+	if (vfs) {
 		ast_applystream(chan, vfs);
+	}
 	ast_playstream(fs);
-	if (vfs)
+	if (vfs) {
 		ast_playstream(vfs);
+	}
 
 	res = ast_waitstream_full(chan, argv[3], agi->audio, agi->ctrl);
 	/* this is to check for if ast_waitstream closed the stream, we probably are at




More information about the asterisk-commits mailing list