]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow fractions of a second in the Wait() application, like it says it allows.
authorJason Parker <jparker@digium.com>
Tue, 2 Jan 2007 17:33:02 +0000 (17:33 +0000)
committerJason Parker <jparker@digium.com>
Tue, 2 Jan 2007 17:33:02 +0000 (17:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49189 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 06202ad0e8fcf5a71a8a41c30cf16932421accdc..d981a994c4853271084557f7ce9e5b4654d542a9 100644 (file)
@@ -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;