From: Tilghman Lesher Date: Wed, 25 Oct 2006 04:58:44 +0000 (+0000) Subject: WaitExten truncates decimals of times to wait, instead of accepting them (Bug 8208) X-Git-Tag: 1.4.0-beta4~280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab677899a7a9907ee5dfb6f4a51943ba28fd9ea9;p=thirdparty%2Fasterisk.git WaitExten truncates decimals of times to wait, instead of accepting them (Bug 8208) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46165 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index db84ac3b20..0223b91885 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5526,6 +5526,7 @@ static int pbx_builtin_wait(struct ast_channel *chan, void *data) 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 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data) 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