aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_speech_utils.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-28 17:47:41 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-28 17:47:41 +0000
commit9c34ba77f7e87e1351a10e9c8ca6daeedb3188fb (patch)
tree5cce8e59620ca83fc51fbe0cd349ae14cbe1f4f0 /apps/app_speech_utils.c
parent54fef797d38f9c4bc6b9aa74a7dc4ae51a30364c (diff)
Merged revisions 57053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r57053 | file | 2007-02-28 12:45:50 -0500 (Wed, 28 Feb 2007) | 2 lines Better handle timeouts when the individual speaks after everything has been played but before the timeout ends. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57054 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r--apps/app_speech_utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index a2c53a550..23de1cdad 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -587,7 +587,7 @@ static int speech_background(struct ast_channel *chan, void *data)
}
/* Do timeout check (shared between audio/dtmf) */
- if (started == 1) {
+ if (!quieted && started == 1) {
time(&current);
if ((current-start) >= timeout) {
done = 1;
@@ -599,8 +599,9 @@ static int speech_background(struct ast_channel *chan, void *data)
/* Do checks on speech structure to see if it's changed */
ast_mutex_lock(&speech->lock);
- if (ast_test_flag(speech, AST_SPEECH_QUIET) && chan->stream != NULL) {
- ast_stopstream(chan);
+ if (ast_test_flag(speech, AST_SPEECH_QUIET)) {
+ if (chan->stream)
+ ast_stopstream(chan);
ast_clear_flag(speech, AST_SPEECH_QUIET);
quieted = 1;
}