]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge.c: Fixed race condition during attended transfer 68/2668/1
authorKevin Harwell <kharwell@digium.com>
Wed, 8 Jul 2015 19:56:10 +0000 (14:56 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 20 Apr 2016 21:52:31 +0000 (16:52 -0500)
commit1fa5565fc439685d7281ba718903d886f61cf743
treef64f9dfffac5f6f9363ce6732e41944a3e5a0154
parentac53e65cb5fb74bc83a9ddec5c73c0b65a2538dd
bridge.c: Fixed race condition during attended transfer

During an attended transfer a thread is started that handles imparting the
bridge channel. From the start of the thread to when the bridge channel is
ready exists a gap that can potentially cause problems (for instance, the
channel being swapped is hung up before the replacement channel enters the
bridge thus stopping the transfer). This patch adds a condition that waits
for the impart thread to get to a point of acceptable readiness before
allowing the initiating thread to continue.

ASTERISK-24782
Reported by: John Bigelow

This patch is a remedial cherry-pick from v13.

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