diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-08 00:17:04 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-08 00:17:04 +0000 |
commit | 8446053c4b89aeb329417df1d116425fe708f050 (patch) | |
tree | 7ed83535e1c4b5d31779a6c0c79cabe87f8f16d5 /main/say.c | |
parent | efc691ad9e3be9f3f89554b31979acbc76581d5e (diff) |
Merged revisions 68397 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r68397 | file | 2007-06-07 20:15:33 -0400 (Thu, 07 Jun 2007) | 2 lines
Don't call ast_waitstream_full when the control file descriptor and audio file descriptor are not set, simply call ast_waitstream! (issue #8530 reported by rickead2000)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68401 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/say.c')
-rw-r--r-- | main/say.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/main/say.c b/main/say.c index 4a649ed02..20f73b5b1 100644 --- a/main/say.c +++ b/main/say.c @@ -125,8 +125,12 @@ static int say_character_str_full(struct ast_channel *chan, const char *str, con fn = fnbuf; } res = ast_streamfile(chan, fn, lang); - if (!res) - res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); + if (!res) { + if ((audiofd > -1) && (ctrlfd > -1)) + res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); + else + res = ast_waitstream(chan, ints); + } ast_stopstream(chan); num++; } @@ -199,8 +203,12 @@ static int say_phonetic_str_full(struct ast_channel *chan, const char *str, cons fn = fnbuf; } res = ast_streamfile(chan, fn, lang); - if (!res) - res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); + if (!res) { + if ((audiofd > -1) && (ctrlfd > -1)) + res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); + else + res = ast_waitstream(chan, ints); + } ast_stopstream(chan); num++; } @@ -244,8 +252,12 @@ static int say_digit_str_full(struct ast_channel *chan, const char *str, const c } if (fn) { res = ast_streamfile(chan, fn, lang); - if (!res) - res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); + if (!res) { + if ((audiofd > -1) && (ctrlfd > -1)) + res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); + else + res = ast_waitstream(chan, ints); + } ast_stopstream(chan); } num++; |