[asterisk-commits] murf: branch murf/bug11210 r103444 - /team/murf/bug11210/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 12 13:32:28 CST 2008


Author: murf
Date: Tue Feb 12 13:32:27 2008
New Revision: 103444

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103444
Log:
OK, this gets rid of the warning message about the sched id that couldn't be deleted. Now, why, why is peer->call not balanced...

Modified:
    team/murf/bug11210/channels/chan_sip.c

Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=103444&r1=103443&r2=103444
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Tue Feb 12 13:32:27 2008
@@ -3049,7 +3049,9 @@
 	dialog_ref(p, "Bump counter in autodestruct to prevent premature destructio of dialog");
 	/* Reset schedule ID */
 	if (p->autokillid != -1) {
-		AST_SCHED_DEL_UNREF(sched, p->autokillid, dialog_unref(p,"dialog unrefd because autokillid sched is being deleted"));
+		/* a SCHED_DEL(_UNREF) was done here... which makes no sense... it's ALWAYS removed from the queue
+		   before the callback is called... */
+		p->autokillid = -1; /* but, it is a really good idea to unset the autokillid field if we aren't going to resched */
 		append_history(p, "CancelDestroy", "");
 	}
 
@@ -3107,6 +3109,7 @@
 	int res = 0;
 	if (p->autokillid > -1) {
 		int res3;
+		
 		if (!(res3 = ast_sched_del(sched, p->autokillid))) {
 			append_history(p, "CancelDestroy", "");
 			p->autokillid = -1;




More information about the asterisk-commits mailing list