aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-09 18:53:08 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-09 18:53:08 +0000
commitbb8d3cc811c9d1d6eedd0ea194e1978746904dbe (patch)
treec1e3287fe73987dc3a681ae7becc34e2a2ada5e4 /main
parent215da4be5548917dc325a66bb32665a5f0fc4172 (diff)
Merged revisions 223273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r223273 | mnicholson | 2009-10-09 13:34:08 -0500 (Fri, 09 Oct 2009) | 14 lines Merged revisions 223225 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r223225 | mnicholson | 2009-10-09 13:20:11 -0500 (Fri, 09 Oct 2009) | 8 lines Signal timeouts by returning AST_CONTROL_RINGING when originating calls. (closes issue #15104) Reported by: nblasgen Patches: manager-timeout1.diff uploaded by mnicholson (license 96) Tested by: nblasgen, mnicholson ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@223286 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index 512e1962e..c96f79372 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3839,7 +3839,11 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d
while (timeout && chan->_state != AST_STATE_UP) {
struct ast_frame *f;
res = ast_waitfor(chan, timeout);
- if (res <= 0) /* error, timeout, or done */
+ if (res == 0) { /* timeout, treat it like ringing */
+ *outstate = AST_CONTROL_RINGING;
+ break;
+ }
+ if (res < 0) /* error or done */
break;
if (timeout > -1)
timeout = res;