diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-10-14 23:57:46 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-10-14 23:57:46 +0000 |
commit | dc36a357d2196bbd7b72fb90c7b1f81e5646c09e (patch) | |
tree | 6647bd3e8e3d53ae32ead7d60c14155d5cf38e86 | |
parent | 63b894e3914018157ea5dd23b5c4445afa5df8d0 (diff) |
When specifying an invalid timeout to Dial, take it
to mean that no timeout is desired.
(closes issue #13625)
Reported by: atis
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | apps/app_dial.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -145,6 +145,8 @@ Application Changes 'UNSUPPORTED'. This change makes SendImage() more consistent with other applications. * Park has a new option, 's', which silences the announcement of the parking space number. + * A non-numeric, zero, or negative timeout specified to Dial() will now be interpreted as + invalid input and will be assumed to mean that no timeout is desired. SIP Changes ----------- diff --git a/apps/app_dial.c b/apps/app_dial.c index b26f9ddd2..bf995d898 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1589,8 +1589,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags to = atoi(args.timeout); if (to > 0) to *= 1000; - else - ast_log(LOG_WARNING, "Invalid timeout specified: '%s'\n", args.timeout); + else { + ast_log(LOG_WARNING, "Invalid timeout specified: '%s'. Setting timeout to infinite\n", args.timeout); + to = -1; + } } if (!outgoing) { |