]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Sat, 9 Sep 2006 13:03:03 +0000 (13:03 +0000)
committerAutomerge script <automerge@asterisk.org>
Sat, 9 Sep 2006 13:03:03 +0000 (13:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@42554 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index d217ba81cd3885504f82c314942ab26d51ca5445..2b73993d71b1d76f631837caaa5d31db5e939f4e 100644 (file)
@@ -9659,16 +9659,14 @@ static void check_pendings(struct sip_pvt *p)
 {
        if (ast_test_flag(p, SIP_PENDINGBYE)) {
                /* if we can't BYE, then this is really a pending CANCEL */
-               if (!ast_test_flag(p, SIP_CAN_BYE)) {
+               if (!ast_test_flag(p, SIP_CAN_BYE))
                        transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, 1, 0);
                        /* 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. */
-                       sip_scheddestroy(p, 32000);
-               } else {
+               else 
                        transmit_request_with_auth(p, SIP_BYE, 0, 1, 1);
-                       ast_set_flag(p, SIP_NEEDDESTROY);       
-                       ast_clear_flag(p, SIP_NEEDREINVITE);    
-               }
+               ast_clear_flag(p, SIP_PENDINGBYE);      
+               sip_scheddestroy(p, 32000);
        } else if (ast_test_flag(p, SIP_NEEDREINVITE)) {
                ast_log(LOG_DEBUG, "Sending pending reinvite on '%s'\n", p->callid);
                /* Didn't get to reinvite yet, so do it now */