[asterisk-commits] oej: trunk r46400 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Oct 29 10:07:47 MST 2006
Author: oej
Date: Sun Oct 29 11:07:47 2006
New Revision: 46400
URL: http://svn.digium.com/view/asterisk?rev=46400&view=rev
Log:
Issues related to issue #7828 - segfault with MWI subscriptions and realtime.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=46400&r1=46399&r2=46400&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sun Oct 29 11:07:47 2006
@@ -1981,6 +1981,10 @@
return 10000; /* Reschedule this destruction so that we know that it's gone */
}
+ if (p->subscribed == MWI_NOTIFICATION)
+ if (p->relatedpeer)
+ ASTOBJ_UNREF(p->relatedpeer,sip_destroy_peer); /* Remove link to peer. If it's realtime, make sure it's gone from memory) */
+
/* Reset schedule ID */
p->autokillid = -1;
@@ -1990,11 +1994,10 @@
if (p->owner) {
ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner in place (Method: %s)\n", p->callid, sip_methods[p->method].text);
ast_queue_hangup(p->owner);
- } else if (p->refer) {
+ } else if (p->refer)
transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
- } else {
+ else
sip_destroy(p);
- }
return 0;
}
@@ -2916,7 +2919,7 @@
ast_verbose("Really destroying SIP dialog '%s' Method: %s\n", p->callid, sip_methods[p->method].text);
/* Remove link from peer to subscription of MWI */
- if (p->relatedpeer && p->relatedpeer->mwipvt)
+ if (p->relatedpeer && p->relatedpeer->mwipvt)
p->relatedpeer->mwipvt = NULL;
if (dumphistory)
More information about the asterisk-commits
mailing list