]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 71065 via svnmerge from
authorJason Parker <jparker@digium.com>
Fri, 22 Jun 2007 15:00:30 +0000 (15:00 +0000)
committerJason Parker <jparker@digium.com>
Fri, 22 Jun 2007 15:00:30 +0000 (15:00 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r71065 | qwell | 2007-06-22 09:52:18 -0500 (Fri, 22 Jun 2007) | 4 lines

Fix a few silly usages of ast_playstream() - it only ever returns 0...

Issue 10035

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@71068 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_speech_utils.c
main/file.c
res/res_agi.c

index 1b7606617a3aa6874d922eb3bf02dc83b93620ca..40b4616e869f9479df811de8cf4330e04fa682d1 100644 (file)
@@ -533,8 +533,7 @@ static int speech_streamfile(struct ast_channel *chan, const char *filename, con
        if (ast_applystream(chan, fs))
                return -1;
        
-       if (ast_playstream(fs))
-               return -1;
+       ast_playstream(fs);
 
         return 0;
 }
index e86a8d497f561e168d99dfbc327f4ced2dfa7774..39b4b42129b8848f827194ac41a52bc9f235fb44 100644 (file)
@@ -802,10 +802,9 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p
                        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 (option_verbose > 2)
                        ast_verbose(VERBOSE_PREFIX_3 "<%s> Playing '%s' (language '%s')\n", chan->name, filename, preflang ? preflang : "default");
 
index 9f20c8f9ca4c702acd11b4adebcb00625e9f8452..4c16b2ab2b394caca5e72de6e3f2e5d0d5073e2d 100644 (file)
@@ -587,14 +587,10 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char
        res = ast_applystream(chan, fs);
        if (vfs)
                vres = ast_applystream(chan, vfs);
-       res = ast_playstream(fs);
+       ast_playstream(fs);
        if (vfs)
-               vres = ast_playstream(vfs);
+               ast_playstream(vfs);
        
-       if (res) {
-               fdprintf(agi->fd, "200 result=%d endpos=%ld\n", res, sample_offset);
-               return (res >= 0) ? RESULT_SHOWUSAGE : RESULT_FAILURE;
-       }
        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 */
@@ -652,16 +648,10 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char *
        res = ast_applystream(chan, fs);
        if (vfs)
                vres = ast_applystream(chan, vfs);
-       res = ast_playstream(fs);
+       ast_playstream(fs);
        if (vfs)
-               vres = ast_playstream(vfs);
-       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(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
         * the end of the stream, return that amount, else check for the amount */