diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-08 00:15:33 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-08 00:15:33 +0000 |
commit | 3afaf8a7b8008f122909c78ec6b05750c2b1683a (patch) | |
tree | 744c2bffe779906f5fb9db301cff40d80a8e4f6f | |
parent | 3ad1e659a7c7e99e85e637e82b31630e27bff5ac (diff) |
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.2@68397 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | say.c | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -120,8 +120,12 @@ int ast_say_character_str_full(struct ast_channel *chan, const char *str, const 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 @@ int ast_say_phonetic_str_full(struct ast_channel *chan, const char *str, const c 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++; } @@ -249,8 +257,12 @@ int ast_say_digit_str_full(struct ast_channel *chan, const char *str, const char } 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++; |