diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-08 17:56:53 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-08 17:56:53 +0000 |
commit | e617d4e0d4785fec43189e7a843c19975a6812d8 (patch) | |
tree | 2358359856567bb37d1171105059d61990edea84 /apps/app_speech_utils.c | |
parent | b9c22bbbec04032eb8b8941d82cf423fb9bb62d8 (diff) |
Merged revisions 53601 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r53601 | file | 2007-02-08 12:54:32 -0500 (Thu, 08 Feb 2007) | 2 lines
Fix timeout issue when utterance is longer then timeout itself.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53602 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r-- | apps/app_speech_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 211cca5d9..dc80dd95f 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -505,7 +505,7 @@ static int speech_streamfile(struct ast_channel *chan, const char *filename, con static int speech_background(struct ast_channel *chan, void *data) { unsigned int timeout = 0; - int res = 0, done = 0, argc = 0, started = 0; + int res = 0, done = 0, argc = 0, started = 0, quieted = 0; struct ast_module_user *u = NULL; struct ast_speech *speech = find_speech(chan); struct ast_frame *f = NULL; @@ -602,6 +602,7 @@ static int speech_background(struct ast_channel *chan, void *data) if (ast_test_flag(speech, AST_SPEECH_QUIET) && chan->stream != NULL) { ast_stopstream(chan); ast_clear_flag(speech, AST_SPEECH_QUIET); + quieted = 1; } /* Check state so we can see what to do */ switch (speech->state) { @@ -609,7 +610,7 @@ static int speech_background(struct ast_channel *chan, void *data) /* If audio playback has stopped do a check for timeout purposes */ if (chan->streamid == -1 && chan->timingfunc == NULL) ast_stopstream(chan); - if (chan->stream == NULL && timeout > 0 && started == 0 && !filename_tmp) { + if (!quieted && chan->stream == NULL && timeout > 0 && started == 0 && !filename_tmp) { time(&start); started = 1; } |