[svn-commits] tilghman: branch 1.4 r46165 - /branches/1.4/main/pbx.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Oct 24 21:58:45 MST 2006


Author: tilghman
Date: Tue Oct 24 23:58:44 2006
New Revision: 46165

URL: http://svn.digium.com/view/asterisk?rev=46165&view=rev
Log:
WaitExten truncates decimals of times to wait, instead of accepting them (Bug 8208)

Modified:
    branches/1.4/main/pbx.c

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?rev=46165&r1=46164&r2=46165&view=diff
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Tue Oct 24 23:58:44 2006
@@ -5526,6 +5526,7 @@
 static int pbx_builtin_waitexten(struct ast_channel *chan, void *data)
 {
 	int ms, res;
+	double sec;
 	struct ast_flags flags = {0};
 	char *opts[1] = { NULL };
 	char *parse;
@@ -5549,8 +5550,8 @@
 		ast_indicate_data(chan, AST_CONTROL_HOLD, opts[0], strlen(opts[0]));
 
 	/* Wait for "n" seconds */
-	if (args.timeout && (ms = atof(args.timeout)) > 0)
-		 ms *= 1000;
+	if (args.timeout && (sec = atof(args.timeout)) > 0.0)
+		ms = 1000 * sec;
 	else if (chan->pbx)
 		ms = chan->pbx->rtimeout * 1000;
 	else



More information about the svn-commits mailing list