]> git.ipfire.org Git - thirdparty/asterisk.git/commit
features: Fix crash when transferee hangs up during DTMF attended transfer. 50/1650/1
authorRichard Mudgett <rmudgett@digium.com>
Tue, 5 May 2015 23:17:54 +0000 (18:17 -0500)
committerMark Michelson <mmichelson@digium.com>
Wed, 18 Nov 2015 21:58:22 +0000 (15:58 -0600)
commitde43ae38b48ff683fe62766c54956066a87d92e5
tree411a4d28a4e08b9251081ce8095508fd53dc390a
parent89d40363ac3c5072baa5f1afbcc684eb6f1f49fd
features: Fix crash when transferee hangs up during DTMF attended transfer.

A crash happens with this sequence of steps:
1) Party A is connected to party B.
2) Party B starts a DTMF attended transfer.
3) Party A hangs up while party B is dialing party C.

When party A hangs up the bridge that party A and party B are in is
dissolved and party B is kicked out of the bridge.  When party B finishes
dialing party C he attempts to move to the new bridge with party C.  Since
party B is no longer in a bridge the attempted move dereferences a NULL
bridge_channel pointer and crashes.

* Made the hold(), unhold(), ringing(), and the bridge_move() functions
tolerant of the channel not being in a bridge.  The assertion that party B
is always in a bridge is not true if the bridged peer of party B hangs up
and dissolves the bridge.  Being tolerant of not being in a bridge allows
the peer hangup stimulus to be processed by the FSM.

* Made the bridge_move() function return void since where the return value
for a failed move was checked generated a FSM coding ERROR message for a
normal off-nominal condition.

* Eliminated most uses of RAII_VAR in bridge_basic.c.

ASTERISK-25003 #close
Reported by: Artem Volodin

Change-Id: Ie2c1b14e5e647d4ea6de300bf56d69805d7bcada
(cherry picked from commit be1260a35f88faea4fa029d59343b124d250a8a6)
main/bridge_basic.c