[asterisk-commits] mmichelson: branch group/CCSS r240970 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 18 11:45:02 CST 2010


Author: mmichelson
Date: Mon Jan 18 11:44:58 2010
New Revision: 240970

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=240970
Log:
Fix refcounts of CC esc_entries.


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=240970&r1=240969&r2=240970
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Mon Jan 18 11:44:58 2010
@@ -24085,6 +24085,7 @@
 		transmit_response_with_sip_etag(p, "200 OK", req, esc_entry, 1);
 	}
 
+	ao2_ref(esc_entry, -1);
 	return res;
 }
 
@@ -24099,7 +24100,8 @@
 	}
 
 	AST_SCHED_DEL(sched, esc_entry->sched_id);
-	ao2_unlink(esc->compositor, esc_entry);
+	/* Scheduler's ref of the esc_entry */
+	ao2_ref(esc_entry, -1);
 
 	if (esc->callbacks->remove_handler) {
 		res = esc->callbacks->remove_handler(p, req, esc, esc_entry);
@@ -24109,6 +24111,8 @@
 		transmit_response_with_sip_etag(p, "200 OK", req, esc_entry, 1);
 	} 
 
+	/* Ref from finding the esc_entry earlier in function */
+	ao2_unlink(esc->compositor, esc_entry);
 	ao2_ref(esc_entry, -1);
 	return res;
 }




More information about the asterisk-commits mailing list