Fix several problems with ast_bridge_add_channel().
authorRichard Mudgett <rmudgett@digium.com>
Wed, 26 Jun 2013 14:38:57 +0000 (14:38 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 26 Jun 2013 14:38:57 +0000 (14:38 +0000)
commitc7d478dd10bbbbb50910da138033c9543b85b8ab
tree245f401b5567e891a02a3081de0f0883017d3d0a
parenta022379107a6c55d5c8ce393d1f5da6691ccac3c
Fix several problems with ast_bridge_add_channel().

* Fix locking problems.  ast_bridge_move() locks two bridges.  To do that,
deadlock avoidance must be done.  Called bridge_move_locked() instead.

* Fix inconsistency in the bridge dissolve check callers.  The original
caller has already removed the channel from the bridge.  The new caller
has not removed the channel from the bridge.  Reverted
bridge_dissolve_check() and added bridge_dissolve_check_stolen() to be
used by the new caller on the original bridge after the channel is moved
to the new bridge.

* Fix memory leak of features if the added channel was already in a
bridge.

* Fix incorrect call to ast_bridge_impart().

* Renamed bridge_chan to yanked_chan.

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