Fix assumption in bridge_native_rtp.c regarding number of participants in a bridge.
authorMark Michelson <mmichelson@digium.com>
Thu, 3 Oct 2013 20:22:17 +0000 (20:22 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 3 Oct 2013 20:22:17 +0000 (20:22 +0000)
commitb11983d4809327c483bfce23efca53bc0fb42c89
tree80d91fbc80d89af9dbcd28ffaa37ba1381a8ab14
parent98269238055e97579225fc13a4f81e7f17085313
Fix assumption in bridge_native_rtp.c regarding number of participants in a bridge.

When a party leaves a bridge, there may be more participants in the bridge than expected.
As such, it is important not to make assumptions regarding the list of channels in a
bridge.

This change makes it so that when a party leaves a native RTP bridge, we unbridge it and
the party it was bridged with. Previously, the first and last channels in the list were
unbridged since it was assumed that these were the two channels that had been bridged. As
previously stated, a new party had been inserted into the bridge, so this logic did not
work properly.

(closes issue ASTERISK-22615)
reported by Matt Jordan

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

Merged revisions 400403 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
bridges/bridge_native_rtp.c
include/asterisk/bridge_technology.h