Fix crash when AMI redirect action redirects two channels out of a bridge.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 22 Apr 2013 16:44:21 +0000 (16:44 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 22 Apr 2013 16:44:21 +0000 (16:44 +0000)
commitc137d1211154427b8cbcdfc499b54556db6c79b2
treee4ed28879161db70d5084ede91b4815e6b42fafc
parente05870ccae05a9d1ccefd093b4be892c9b7b33b1
Fix crash when AMI redirect action redirects two channels out of a bridge.

The two party bridging loops were changing the bridge peer pointers
without the channel locks held.  Thus when ast_channel_massquerade()
tested and used the pointer there is a small window of opportunity for the
pointers to become NULL even though the masquerade code has the channels
locked.

(closes issue ASTERISK-21356)
Reported by: William luke
Patches:
      jira_asterisk_21356_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: William luke
........

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel.c