From cb82979700d778f8e78b88e1da04e3a0756ae6bd Mon Sep 17 00:00:00 2001 From: Olle Johansson Date: Tue, 14 Nov 2006 11:14:01 +0000 Subject: [PATCH] Issue #8272 - Don't destroy dialog in retransmission system if it's an OPTION packet from peerpoke git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47597 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2aa7793677..12aa997543 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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);