]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 223273 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 9 Oct 2009 18:36:37 +0000 (18:36 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 9 Oct 2009 18:36:37 +0000 (18:36 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@223277 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 483377fb1147b9430dbad868d8a571732cc96c02..8bbc98ac829c198121194bb10e6c59abd665e739 100644 (file)
@@ -3811,7 +3811,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;