aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-23 19:29:44 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-23 19:29:44 +0000
commite8b80d54f22effdb29a8aebfb65111814271b6d6 (patch)
tree8b8f8b2a18c8df479d38c0d9125e6ffb81d12251 /funcs
parentc15217e47d4999376746fce96bbc01ff9cc25918 (diff)
Revert very broken fix for issue #10540 ... none of these values take ms so I
don't know what I was thinking git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80547 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_timeout.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c
index 37b441127..f327e7608 100644
--- a/funcs/func_timeout.c
+++ b/funcs/func_timeout.c
@@ -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':