[asterisk-commits] file: branch 1.4 r59223 -
/branches/1.4/apps/app_speech_utils.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Mar 26 12:34:14 MST 2007
Author: file
Date: Mon Mar 26 14:34:14 2007
New Revision: 59223
URL: http://svn.digium.com/view/asterisk?view=rev&rev=59223
Log:
Add ability to specify no timeout. This means as soon as the prompt is done playing it moves on to the next priority.
Modified:
branches/1.4/apps/app_speech_utils.c
Modified: branches/1.4/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_speech_utils.c?view=diff&rev=59223&r1=59222&r2=59223
==============================================================================
--- branches/1.4/apps/app_speech_utils.c (original)
+++ branches/1.4/apps/app_speech_utils.c Mon Mar 26 14:34:14 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 asterisk-commits
mailing list