diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-22 15:00:30 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-22 15:00:30 +0000 |
commit | e0de2cf9f7a272962738f1ff9ea4bff69a3e99c8 (patch) | |
tree | 7d0ead916db4d4437371b0ffd9c9bc1503032d89 | |
parent | c75cc8c67fee0512dd7e6996a0d55bfe2f57f4f4 (diff) |
Merged revisions 71065 via svnmerge from
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: http://svn.digium.com/svn/asterisk/branches/1.4@71068 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_speech_utils.c | 3 | ||||
-rw-r--r-- | main/file.c | 7 | ||||
-rw-r--r-- | res/res_agi.c | 20 |
3 files changed, 9 insertions, 21 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 1b7606617..40b4616e8 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -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; } diff --git a/main/file.c b/main/file.c index e86a8d497..39b4b4212 100644 --- a/main/file.c +++ b/main/file.c @@ -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"); diff --git a/res/res_agi.c b/res/res_agi.c index 9f20c8f9c..4c16b2ab2 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -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 */ |