[asterisk-commits] tilghman: branch 1.4 r89184 - in /branches/1.4: channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 12 11:29:17 CST 2007
Author: tilghman
Date: Mon Nov 12 11:29:17 2007
New Revision: 89184
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89184
Log:
Fix two cases of memory corruption caused by background threads.
Reported by: atis
Patch by: tilghman
Fixes issue #10923
Modified:
branches/1.4/channels/chan_sip.c
branches/1.4/main/channel.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=89184&r1=89183&r2=89184
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Nov 12 11:29:17 2007
@@ -2065,6 +2065,14 @@
if (option_debug > 2)
ast_log(LOG_DEBUG, "Re-scheduled destruction of SIP subsription %s\n", p->callid ? p->callid : "<unknown>");
return 10000; /* Reschedule this destruction so that we know that it's gone */
+ }
+
+ /* If there are packets still waiting for delivery, delay the destruction */
+ if (p->packets) {
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Re-scheduled destruction of SIP call %s\n", p->callid ? p->callid : "<unknown>");
+ append_history(p, "ReliableXmit", "timeout");
+ return 10000;
}
/* If we're destroying a subscription, dereference peer object too */
Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=89184&r1=89183&r2=89184
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Mon Nov 12 11:29:17 2007
@@ -1708,6 +1708,8 @@
ast_channel_lock(chan);
detach_spies(chan); /* get rid of spies */
+
+ ast_autoservice_stop(chan);
if (chan->masq) {
if (ast_do_masquerade(chan))
More information about the asterisk-commits
mailing list