From: Jason Parker Date: Tue, 2 Jan 2007 17:33:02 +0000 (+0000) Subject: Allow fractions of a second in the Wait() application, like it says it allows. X-Git-Tag: 1.4.1~348 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b500883662cd1d8a65502bb62048210cebb2249;p=thirdparty%2Fasterisk.git Allow fractions of a second in the Wait() application, like it says it allows. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49189 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index 06202ad0e8..d981a994c4 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5507,11 +5507,12 @@ static int pbx_builtin_execiftime(struct ast_channel *chan, void *data) */ static int pbx_builtin_wait(struct ast_channel *chan, void *data) { + double s; int ms; /* Wait for "n" seconds */ - if (data && (ms = atof(data)) > 0) { - ms *= 1000; + if (data && (s = atof(data)) > 0) { + ms = s * 1000.0; return ast_safe_sleep(chan, ms); } return 0;