From: Joshua Colp Date: Tue, 10 Jun 2008 13:36:13 +0000 (+0000) Subject: Merged revisions 121495 via svnmerge from X-Git-Tag: 1.6.2.0-beta1~2040 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51602928e3069889a0b9bcbe492b52bd969b772b;p=thirdparty%2Fasterisk.git Merged revisions 121495 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r121495 | file | 2008-06-10 10:34:27 -0300 (Tue, 10 Jun 2008) | 4 lines If we are destroying a dialog only set the MWI dialog pointer on the related peer to NULL if it is the dialog currently being destroyed. (closes issue #12828) Reported by: ramonpeek ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121496 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6da662f5ee..0962fc7e91 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2485,7 +2485,7 @@ static void *dialog_unlink_all(struct sip_pvt *dialog, int lockowner, int lockdi dialog->stateid = -1; /* shouldn't we 'zero' this out? */ } /* Remove link from peer to subscription of MWI */ - if (dialog->relatedpeer && dialog->relatedpeer->mwipvt) + if (dialog->relatedpeer && dialog->relatedpeer->mwipvt == dialog) dialog->relatedpeer->mwipvt = dialog_unref(dialog->relatedpeer->mwipvt, "delete ->relatedpeer->mwipvt"); if (dialog->relatedpeer && dialog->relatedpeer->call == dialog) dialog->relatedpeer->call = dialog_unref(dialog->relatedpeer->call, "unset the relatedpeer->call field in tandem with relatedpeer field itself");