]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge.c: Fixed race condition during attended transfer 39/839/5
authorKevin Harwell <kharwell@digium.com>
Wed, 8 Jul 2015 19:56:10 +0000 (14:56 -0500)
committerKevin Harwell <kharwell@digium.com>
Mon, 13 Jul 2015 17:55:21 +0000 (12:55 -0500)
commit97ee0ee6c6d5f37591183339999d8cb936bf517a
tree93d3fe9f89bfb99c63489f3e16c6943274f0bcd1
parent7ff1ac8797a479ae5416d7c51a761552ecde011e
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

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