Softmix: Fix crash when switching from softmix to another bridge technology.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 11 Oct 2013 16:28:50 +0000 (16:28 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 11 Oct 2013 16:28:50 +0000 (16:28 +0000)
commit0ddcee5a463fac404939c3ae7b9d24d405b94304
tree72915c2485e2b9d606f25af483f8cb251119e810
parent113c28178214bda05e3b873ad3d05df5288b0920
Softmix: Fix crash when switching from softmix to another bridge technology.

The crash is caused by a race condition when switching between native RTP
and softmix bridging technologies.  In this situation, the bridging
technology is switched from native RTP to softmix, and then back to native
RTP fast enough that the softmix private data gets destroyed before the
softmix mixing thread gets started.

Thanks to Kinsey Moore for the crash analysis.

* Fix race condition when starting the softmix mixing thread and switching
to another bridge technology.

(closes issue ASTERISK-22678)
Reported by: John Bigelow
Patches:
      jira_asterisk_22678_v12.patch (license #5621) patch uploaded by rmudgett
Tested by: John Bigelow
........

Merged revisions 400849 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
bridges/bridge_softmix.c