mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Make app_dial complain if the timeout passed is non numeric
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -668,9 +668,13 @@ static int dial_exec(struct ast_channel *chan, void *data)
|
|||||||
cur = rest;
|
cur = rest;
|
||||||
} while(cur);
|
} while(cur);
|
||||||
|
|
||||||
if (timeout && strlen(timeout))
|
if (timeout && strlen(timeout)) {
|
||||||
to = atoi(timeout) * 1000;
|
to = atoi(timeout);
|
||||||
else
|
if (to > 0)
|
||||||
|
to *= 1000;
|
||||||
|
else
|
||||||
|
ast_log(LOG_WARNING, "Invalid timeout specified: '%s'\n", timeout);
|
||||||
|
} else
|
||||||
to = -1;
|
to = -1;
|
||||||
peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect);
|
peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect);
|
||||||
if (!peer) {
|
if (!peer) {
|
||||||
|
Reference in New Issue
Block a user