[svn-commits] file: trunk r53602 - in /trunk: ./ apps/app_speech_utils.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Feb 8 10:56:54 MST 2007


Author: file
Date: Thu Feb  8 11:56:53 2007
New Revision: 53602

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53602
Log:
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.

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_speech_utils.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_speech_utils.c?view=diff&rev=53602&r1=53601&r2=53602
==============================================================================
--- trunk/apps/app_speech_utils.c (original)
+++ trunk/apps/app_speech_utils.c Thu Feb  8 11:56:53 2007
@@ -505,7 +505,7 @@
 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 @@
                 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 @@
                         /* 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;
                         }



More information about the svn-commits mailing list