When specifying an invalid timeout to Dial, take it
authorMark Michelson <mmichelson@digium.com>
Tue, 14 Oct 2008 23:57:46 +0000 (23:57 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 14 Oct 2008 23:57:46 +0000 (23:57 +0000)
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

CHANGES
apps/app_dial.c

diff --git a/CHANGES b/CHANGES
index ee8c65a..be399c6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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
 -----------
index b26f9dd..bf995d8 100644 (file)
@@ -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) {