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

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Mar 26 12:35:24 MST 2007


Author: file
Date: Mon Mar 26 14:35:24 2007
New Revision: 59224

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59224
Log:
Merged revisions 59223 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59223 | file | 2007-03-26 16:34:14 -0300 (Mon, 26 Mar 2007) | 2 lines

Add ability to specify no timeout. This means as soon as the prompt is done playing it moves on to the next priority.

........

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=59224&r1=59223&r2=59224
==============================================================================
--- trunk/apps/app_speech_utils.c (original)
+++ trunk/apps/app_speech_utils.c Mon Mar 26 14:35:24 2007
@@ -544,8 +544,11 @@
         if (argc > 0) {
                 /* Yay sound file */
                 filename_tmp = ast_strdupa(argv[0]);
-                if (argv[1] != NULL)
-                        timeout = atoi(argv[1]);
+		if (!ast_strlen_zero(argv[1])) {
+			if ((timeout = atoi(argv[1])) == 0)
+				timeout = -1;
+		} else
+			timeout = 0;
         }
 
         /* Before we go into waiting for stuff... make sure the structure is ready, if not - start it again */
@@ -611,7 +614,13 @@
                         /* If audio playback has stopped do a check for timeout purposes */
                         if (chan->streamid == -1 && chan->timingfunc == NULL)
                                 ast_stopstream(chan);
-                        if (!quieted && chan->stream == NULL && timeout > 0 && started == 0 && !filename_tmp) {
+                        if (!quieted && chan->stream == NULL && timeout && started == 0 && !filename_tmp) {
+				if (timeout == -1) {
+					done = 1;
+					if (f)
+						ast_frfree(f);
+					break;
+				}
 				time(&start);
 				started = 1;
                         }



More information about the svn-commits mailing list