[Asterisk-code-review] bridge simple.c: Fix stream topology handling. (asterisk[15])

Jasper van der Neut asteriskteam at digium.com
Wed Feb 21 02:53:51 CST 2018


Jasper van der Neut has posted comments on this change. ( https://gerrit.asterisk.org/8308 )

Change subject: bridge_simple.c: Fix stream topology handling.
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/#/c/8308/1/bridges/bridge_simple.c
File bridges/bridge_simple.c:

https://gerrit.asterisk.org/#/c/8308/1/bridges/bridge_simple.c@132
PS1, Line 132: 	new_topology = ast_stream_topology_clone(requested_topology);
requested_topology is not used anywhere, just use
 new_topology = ast_stream_topology_clone(ast_channel_get_stream_topology(requested_chan));


https://gerrit.asterisk.org/#/c/8308/1/bridges/bridge_simple.c@213
PS1, Line 213: 	/* c0 and c1 are unlocked by simple_bridge_request_stream_topology_change() */
channel locking/unlocking should happen in the same context. So either inline simple_bridge_request_stream_topology_change or let it return 'new_topology' and then unlock the channels, call ast_channel_request_stream_topology_change and free the new topology here:

 new_topology = simple_bridge_request_stream_topology_change(c1, c0);
 ast_channel_unlock(c1);
 ast_channel_unlock(c0);
 if (new_topology) {
   ast_channel_request_stream_topology_change(c1, new_topology, &simple_bridge);
   ast_stream_topology(new_topology);
 }



-- 
To view, visit https://gerrit.asterisk.org/8308
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica5d78a6c7ecf4f0b95fb16de28d3889b32c4776
Gerrit-Change-Number: 8308
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Jasper van der Neut <jasper at isotopic.nl>
Gerrit-Reviewer: Jenkins2
Gerrit-Comment-Date: Wed, 21 Feb 2018 08:53:51 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/c4a45fc8/attachment-0001.html>


More information about the asterisk-code-review mailing list