Bridge core: Pass a ref with the swap channel when joining a bridge.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 22 Jan 2015 19:30:12 +0000 (19:30 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 22 Jan 2015 19:30:12 +0000 (19:30 +0000)
commit9bff4eeca3d1fe1d10217b62d326c3907af09e00
treee2634acc0439d25099e12990c9ee7b193c59c41a
parente67ca431ee2addffd9e23c895ef170f2dc79bfb6
Bridge core: Pass a ref with the swap channel when joining a bridge.

When code imparts a channel into a bridge to swap with another channel, a
ref needs to be held on the swap channel to ensure that it cannot
dissapear before finding it in the bridge.

* The ast_bridge_join() swap channel parameter now always steals a ref for
the swap channel.  This is the only change to the bridge framework's
public API semantics.

* bridge_channel_internal_join() now requires the bridge_channel->swap
channel to pass in a ref.

ASTERISK-24649
Reported by: John Bigelow

Review: https://reviewboard.asterisk.org/r/4354/
........

Merged revisions 430975 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/bridge.h
include/asterisk/bridge_channel_internal.h
include/asterisk/bridge_internal.h
main/bridge.c
main/bridge_channel.c