]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Revert very broken fix for issue #10540 ... none of these values take ms so I
authorRussell Bryant <russell@russellbryant.com>
Thu, 23 Aug 2007 19:29:44 +0000 (19:29 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 23 Aug 2007 19:29:44 +0000 (19:29 +0000)
don't know what I was thinking

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80547 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_timeout.c

index 37b441127e32bc82c969c629cf8e73ffc2c89db9..f327e7608a6cf51d1defe4c62ff67fa4cd5025de 100644 (file)
@@ -89,7 +89,6 @@ static int timeout_read(struct ast_channel *chan, char *cmd, char *data,
 static int timeout_write(struct ast_channel *chan, char *cmd, char *data,
                         const char *value)
 {
-       float f;
        int x;
        char timestr[64];
        struct tm myt;
@@ -105,10 +104,9 @@ static int timeout_write(struct ast_channel *chan, char *cmd, char *data,
        if (!value)
                return -1;
 
-       f = atof(value);
-       if (f < 0)
-               f = 1.0;
-       x = (int) (f * 1000);
+       x = atoi(value);
+       if (x < 0)
+               x = 0;
 
        switch (*data) {
        case 'a':