[svn-commits] qwell: branch 1.2 r71065 - in /branches/1.2: file.c res/res_agi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 22 09:52:18 CDT 2007


Author: qwell
Date: Fri Jun 22 09:52:18 2007
New Revision: 71065

URL: http://svn.digium.com/view/asterisk?view=rev&rev=71065
Log:
Fix a few silly usages of ast_playstream() - it only ever returns 0...

Issue 10035

Modified:
    branches/1.2/file.c
    branches/1.2/res/res_agi.c

Modified: branches/1.2/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/file.c?view=diff&rev=71065&r1=71064&r2=71065
==============================================================================
--- branches/1.2/file.c (original)
+++ branches/1.2/file.c Fri Jun 22 09:52:18 2007
@@ -816,10 +816,9 @@
 			return -1;
 		if (vfs && ast_applystream(chan, vfs))
 			return -1;
-		if (ast_playstream(fs))
-			return -1;
-		if (vfs && ast_playstream(vfs))
-			return -1;
+		ast_playstream(fs);
+		if (vfs)
+			ast_playstream(vfs);
 #if 1
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Playing '%s' (language '%s')\n", filename, preflang ? preflang : "default");

Modified: branches/1.2/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/res/res_agi.c?view=diff&rev=71065&r1=71064&r2=71065
==============================================================================
--- branches/1.2/res/res_agi.c (original)
+++ branches/1.2/res/res_agi.c Fri Jun 22 09:52:18 2007
@@ -569,14 +569,7 @@
 	max_length = ast_tellstream(fs);
 	ast_seekstream(fs, sample_offset, SEEK_SET);
 	res = ast_applystream(chan, fs);
-	res = ast_playstream(fs);
-	if (res) {
-		fdprintf(agi->fd, "200 result=%d endpos=%ld\n", res, sample_offset);
-		if (res >= 0)
-			return RESULT_SHOWUSAGE;
-		else
-			return RESULT_FAILURE;
-	}
+	ast_playstream(fs);
 	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
 	 * the end of the stream, return that amount, else check for the amount */
@@ -629,14 +622,7 @@
         max_length = ast_tellstream(fs);
         ast_seekstream(fs, sample_offset, SEEK_SET);
         res = ast_applystream(chan, fs);
-        res = ast_playstream(fs);
-        if (res) {
-                fdprintf(agi->fd, "200 result=%d endpos=%ld\n", res, sample_offset);
-                if (res >= 0)
-                        return RESULT_SHOWUSAGE;
-                else
-                        return RESULT_FAILURE;
-        }
+        ast_playstream(fs);
         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
          * the end of the stream, return that amount, else check for the amount */




More information about the svn-commits mailing list