From 28aafe781bfa497b3e70a54983b08f19ee028374 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 14 Oct 2008 23:58:10 +0000 Subject: [PATCH] Merged revisions 149279 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r149279 | mmichelson | 2008-10-14 18:57:46 -0500 (Tue, 14 Oct 2008) | 7 lines 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/branches/1.6.1@149280 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- CHANGES | 2 ++ apps/app_dial.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d65fce0b43..6dc35958d2 100644 --- a/CHANGES +++ b/CHANGES @@ -109,6 +109,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 df2dd5fe58..3fdbdb6f55 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) {