[Asterisk-code-review] Bridging: Use a ref to bridge_channel's channel to prevent crash. (asterisk[13])

Joshua Colp asteriskteam at digium.com
Wed Sep 2 05:33:23 CDT 2020


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14885 )

Change subject: Bridging: Use a ref to bridge_channel's channel to prevent crash.
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/c/asterisk/+/14885/2/include/asterisk/bridge_channel.h 
File include/asterisk/bridge_channel.h:

https://gerrit.asterisk.org/c/asterisk/+/14885/2/include/asterisk/bridge_channel.h@186 
PS2, Line 186:  */
While you have it kind of documented in the retval, I'd be more explicit and add a \note with specific instructions on unreffing. I would also document when it is best to use this function (when accessing the bridge_channel chan from outside of a bridging thread)


https://gerrit.asterisk.org/c/asterisk/+/14885/2/main/bridge.c 
File main/bridge.c:

https://gerrit.asterisk.org/c/asterisk/+/14885/2/main/bridge.c@1723 
PS2, Line 1723: 	ao2_lock(bridge_channel);
This should also be done in the bridge_channel_ind_thread and bridge_impart_internal functions.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14885
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ic48715c0c041615d17d286790ae3e8c61bb28814
Gerrit-Change-Number: 14885
Gerrit-PatchSet: 2
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Wed, 02 Sep 2020 10:33:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200902/ad7e8cdb/attachment.html>


More information about the asterisk-code-review mailing list