aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-25 04:58:44 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-25 04:58:44 +0000
commitc3ad9c9ef53aa9d4297f7c0f009da3c33f50bebc (patch)
tree851c774cadd4b51cc43e030652e76a2ddda55541 /main/pbx.c
parentcec97ad9e6af609b380638ae925c761a436d5e2d (diff)
WaitExten truncates decimals of times to wait, instead of accepting them (Bug 8208)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46165 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c
index db84ac3b2..0223b9188 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