[asterisk-commits] mnicholson: branch 1.4 r311199 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 17 14:06:30 CDT 2011
Author: mnicholson
Date: Thu Mar 17 14:06:24 2011
New Revision: 311199
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311199
Log:
Remove the provisional keepalive scheduler entry's reference to the pvt when we remove the scheduler entry.
ABE-2756
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=311199&r1=311198&r2=311199
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu Mar 17 14:06:24 2011
@@ -2487,11 +2487,17 @@
return;
}
res = AST_SCHED_DEL(sched, pvt->provisional_keepalive_data->sched_id);
- /* If we could not remove this item. remove pvt's reference this data and mark it for removal
- * for the next time the scheduler uses it. The scheduler has it's own ref to this data
- * and will detect it should not reschedule the event since the sched_id is -1 and pvt == NULL */
if (res == -1) {
+ /* If we could not remove this item. remove pvt's reference
+ * this data and mark it for removal for the next time the
+ * scheduler uses it. The scheduler has it's own ref to this
+ * data and will detect it should not reschedule the event
+ * since the sched_id is -1 and pvt == NULL */
pvt->provisional_keepalive_data = unref_provisional_keepalive(pvt->provisional_keepalive_data);
+ } else {
+ /* If we successfully canceled the scheduler entry, we need to
+ * remove its reference to the data. */
+ ao2_ref(pvt->provisional_keepalive_data, -1);
}
}
More information about the asterisk-commits
mailing list