]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If we are destroying a dialog only set the MWI dialog pointer on the related peer...
authorJoshua Colp <jcolp@digium.com>
Tue, 10 Jun 2008 13:34:27 +0000 (13:34 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 10 Jun 2008 13:34:27 +0000 (13:34 +0000)
(closes issue #12828)
Reported by: ramonpeek

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@121495 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2838110cee843df9edd1e1abff5d44ab04dfd958..912fe9a5ecca0b6b2bcca16e0ac4366c2b84fb1a 100644 (file)
@@ -3115,7 +3115,9 @@ static int __sip_destroy(struct sip_pvt *p, int lockowner)
 
        /* Remove link from peer to subscription of MWI */
        if (p->relatedpeer) {
-               p->relatedpeer->mwipvt = NULL;
+               if (p->relatedpeer->mwipvt == p) {
+                       p->relatedpeer->mwipvt = NULL;
+               }
                ASTOBJ_UNREF(p->relatedpeer, sip_destroy_peer);
        }