[asterisk-commits] file: trunk r100632 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 28 13:04:54 CST 2008


Author: file
Date: Mon Jan 28 13:04:53 2008
New Revision: 100632

URL: http://svn.digium.com/view/asterisk?view=rev&rev=100632
Log:
Fix up two scheduling issues. In one instance a scheduled item was not deleted when it should not have been and in the other it was scheduled again when it shouldn't have been.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=100632&r1=100631&r2=100632
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jan 28 13:04:53 2008
@@ -2820,8 +2820,6 @@
 		append_history(pkt->owner, "XmitErr", "%s", pkt->is_fatal ? "(Critical)" : "(Non-critical)");
 		return AST_FAILURE;
 	} else {
-		/* Schedule retransmission */
-		pkt->retransid = ast_sched_add_variable(sched, siptimer_a, retrans_pkt, pkt, 1);
 		return AST_SUCCESS;
 	}
 }
@@ -2946,6 +2944,7 @@
 				if (sipdebug)
 					ast_debug(4, "** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #%d\n", cur->retransid);
 			}
+			AST_SCHED_DEL(sched, cur->retransid);
 			UNLINK(cur, p->packets, prev);
 			dialog_unref(cur->owner);
 			ast_free(cur);




More information about the asterisk-commits mailing list