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/branches/1.4@121495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Joshua Colp 18 years ago
parent 88f21bd666
commit fb87cc02f9

@ -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);
}

Loading…
Cancel
Save