projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a925c1b
)
Make app_dial complain if the timeout passed is non numeric
author
James Golovich
<james@gnuinter.net>
Fri, 2 Apr 2004 07:47:23 +0000
(07:47 +0000)
committer
James Golovich
<james@gnuinter.net>
Fri, 2 Apr 2004 07:47:23 +0000
(07:47 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2601
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
apps/app_dial.c
patch
|
blob
|
history
diff --git
a/apps/app_dial.c
b/apps/app_dial.c
index
35221aa
..
af3c70c
100755
(executable)
--- a/
apps/app_dial.c
+++ b/
apps/app_dial.c
@@
-668,9
+668,13
@@
static int dial_exec(struct ast_channel *chan, void *data)
cur = rest;
} while(cur);
- if (timeout && strlen(timeout))
- to = atoi(timeout) * 1000;
- else
+ if (timeout && strlen(timeout)) {
+ to = atoi(timeout);
+ if (to > 0)
+ to *= 1000;
+ else
+ ast_log(LOG_WARNING, "Invalid timeout specified: '%s'\n", timeout);
+ } else
to = -1;
peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect);
if (!peer) {