]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #8272 - Don't destroy dialog in retransmission system if it's an OPTION packet...
authorOlle Johansson <oej@edvina.net>
Tue, 14 Nov 2006 11:14:01 +0000 (11:14 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 14 Nov 2006 11:14:01 +0000 (11:14 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47597 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2aa7793677f4ea1ecaa6c521cdb54bffe92ebcac..12aa99754331b382c3fb2d9fd606469d68e24f75 100644 (file)
@@ -1877,7 +1877,10 @@ static int retrans_pkt(void *data)
                        ast_channel_unlock(pkt->owner->owner);
                } else {
                        /* If no channel owner, destroy now */
-                       ast_set_flag(&pkt->owner->flags[0], SIP_NEEDDESTROY);   
+
+                       /* Let the peerpoke system expire packets when the timer expires for poke_noanswer */
+                       if (pkt->method != SIP_OPTIONS)
+                               ast_set_flag(&pkt->owner->flags[0], SIP_NEEDDESTROY);   
                }
        }
        /* In any case, go ahead and remove the packet */
@@ -14840,7 +14843,7 @@ static int sip_poke_peer(struct sip_peer *peer)
                peer->call = NULL;
                return 0;
        }
-       if (peer->call > 0) {
+       if (peer->call) {
                if (sipdebug)
                        ast_log(LOG_NOTICE, "Still have a QUALIFY dialog active, deleting\n");
                sip_destroy(peer->call);