Avoid unconditional NULLing of mwipvt on relatedpeer on SIP dialog destruction

The other instance of this bug was fixed by jcolp/file in r121496. 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 ASTERISK-20119)
Patch-by: Misha Vodsedalek
........

Merged revisions 371270 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371271 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 371272 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Kinsey Moore 13 years ago
parent 76d642ff69
commit 837e00a5cc

@ -6115,7 +6115,7 @@ void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist)
}
/* Remove link from peer to subscription of MWI */
if (p->relatedpeer && p->relatedpeer->mwipvt)
if (p->relatedpeer && p->relatedpeer->mwipvt == p)
p->relatedpeer->mwipvt = dialog_unref(p->relatedpeer->mwipvt, "delete ->relatedpeer->mwipvt");
if (p->relatedpeer && p->relatedpeer->call == p)
p->relatedpeer->call = dialog_unref(p->relatedpeer->call, "unset the relatedpeer->call field in tandem with relatedpeer field itself");

Loading…
Cancel
Save