]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Bridge core: Pass a ref with the swap channel when joining a bridge. 63/2663/1
authorRichard Mudgett <rmudgett@digium.com>
Thu, 22 Jan 2015 19:24:28 +0000 (19:24 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 20 Apr 2016 21:50:33 +0000 (16:50 -0500)
commitbc0a8c7bac087c75657db5fccb33829a6db7bf21
treec4d05282468287d81a63a58034913d0be47a800c
parent1bd1bd1178af16e6c04b39090a35ee03c37cc252
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/

This patch is a remedial cherry-pick from v13.

Change-Id: I73fdf13a3a1042566281c7d06d6e83e2ef87c120
include/asterisk/bridge.h
include/asterisk/bridge_channel_internal.h
include/asterisk/bridge_internal.h
main/bridge.c
main/bridge_channel.c