]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 288343 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Wed, 22 Sep 2010 16:53:28 +0000 (16:53 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 22 Sep 2010 16:53:28 +0000 (16:53 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r288343 | dvossel | 2010-09-22 11:49:56 -0500 (Wed, 22 Sep 2010) | 2 lines

  During check_pendings, if the dialog is terminated with a CANCEL, change the invitestate to INV_CANCEL like in sip_hangup.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@288344 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ba4a4be5d6f3974c38f57b14ea62565f8cad4744..601bdba2338ec9afb1e0ee51f9d766d94d2cf5ec 100644 (file)
@@ -17696,11 +17696,12 @@ static void check_pendings(struct sip_pvt *p)
 {
        if (ast_test_flag(&p->flags[0], SIP_PENDINGBYE)) {
                /* if we can't BYE, then this is really a pending CANCEL */
-               if (p->invitestate == INV_PROCEEDING || p->invitestate == INV_EARLY_MEDIA)
+               if (p->invitestate == INV_PROCEEDING || p->invitestate == INV_EARLY_MEDIA) {
+                       p->invitestate = INV_CANCELLED;
                        transmit_request(p, SIP_CANCEL, p->lastinvite, XMIT_RELIABLE, FALSE);
                        /* Actually don't destroy us yet, wait for the 487 on our original 
                           INVITE, but do set an autodestruct just in case we never get it. */
-               else {
+               else {
                        /* We have a pending outbound invite, don't send something
                                new in-transaction */
                        if (p->pendinginvite)