bridge: Fix stream topology/participant locking and video misrouting.

This change fixes a few locking issues and some video misrouting.

1. When accessing the stream topology of a channel the channel lock
must be held to guarantee the topology remains valid.

2. When a channel was joined to a bridge the bridge specific
implementation for stream mapping was not invoked, causing video
to be misrouted for a brief period of time.

ASTERISK-27182

Change-Id: I5d2f779248b84d41c5bb3896bf22ba324b336b03
This commit is contained in:
Joshua Colp
2017-08-06 16:15:34 +00:00
parent 2014a695f7
commit 0e352ec510
3 changed files with 51 additions and 22 deletions

View File

@@ -446,7 +446,12 @@ static void bridge_channel_complete_join(struct ast_bridge *bridge, struct ast_b
* media types vector. This way all streams map to the same media type index for
* a given channel.
*/
ast_bridge_channel_stream_map(bridge_channel);
if (bridge_channel->bridge->technology->stream_topology_changed) {
bridge_channel->bridge->technology->stream_topology_changed(
bridge_channel->bridge, bridge_channel);
} else {
ast_bridge_channel_stream_map(bridge_channel);
}
}
/*!