[svn-commits] oej: branch 1.2 r47596 - /branches/1.2/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Nov 14 04:06:32 MST 2006


Author: oej
Date: Tue Nov 14 05:06:31 2006
New Revision: 47596

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47596
Log:
Avoid collissions between the peerpoke system and the retransmits. Issue #8272.
In some cases, changed timers caused the retransmit system to destroy the dialog before peerpoke_expire
got a chance.

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=47596&r1=47595&r2=47596
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Tue Nov 14 05:06:31 2006
@@ -1246,7 +1246,9 @@
 			ast_mutex_unlock(&pkt->owner->owner->lock);
 		} else {
 			/* If no channel owner, destroy now */
-			ast_set_flag(pkt->owner, 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, SIP_NEEDDESTROY);	
 		}
 	}
 	/* In any case, go ahead and remove the packet */
@@ -9968,7 +9970,7 @@
 			ast_sched_del(sched, peer->pokeexpire);
 		if (sipmethod == SIP_INVITE)	/* Does this really happen? */
 			transmit_request(p, SIP_ACK, seqno, 0, 0);
-		ast_set_flag(p, SIP_NEEDDESTROY);	
+		ast_set_flag(p, SIP_NEEDDESTROY);
 
 		/* Try again eventually */
 		if ((peer->lastms < 0)  || (peer->lastms > peer->maxms))
@@ -11691,7 +11693,7 @@
 		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);



More information about the svn-commits mailing list