[asterisk-dev] [Code Review] 2717: Get rid of ast_bridged_channel() calls throughout the code.

svnbot reviewboard at asterisk.org
Fri Aug 2 09:05:17 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2717/
-----------------------------------------------------------

(Updated Aug. 2, 2013, 9:05 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 396103


Bugs: ASTERISK-22039
    https://issues.asterisk.org/jira/browse/ASTERISK-22039


Repository: Asterisk


Description
-------

This gets rid of all calls to ast_bridged_channel() in Asterisk.

There are some cases where a completely different approach could likely be taken. However, the uses of the function are in not wrong, per se. So I took one of two approaches here:

* If the actual bridged channel was being used, then I replaced the function call with ast_channel_bridge_peer(). The potential tricky factor here is that this function locks the channel. I tried to be sure that this was safe in all cases, but having another set of eyes double-check would be good.
* If the function was being called just to see if a channel was in a bridge, I replaced the function call with ast_channel_is_bridged().


Diffs
-----

  /trunk/apps/app_chanspy.c 395825 
  /trunk/channels/chan_dahdi.c 395825 
  /trunk/channels/chan_iax2.c 395825 
  /trunk/channels/chan_mgcp.c 395825 
  /trunk/channels/chan_misdn.c 395825 
  /trunk/channels/chan_oss.c 395825 
  /trunk/channels/chan_sip.c 395825 
  /trunk/channels/chan_skinny.c 395825 
  /trunk/channels/sig_analog.c 395825 
  /trunk/funcs/func_channel.c 395825 
  /trunk/include/asterisk/channel.h 395825 
  /trunk/main/channel.c 395825 
  /trunk/main/channel_internal_api.c 395825 
  /trunk/main/features.c 395825 
  /trunk/main/rtp_engine.c 395825 

Diff: https://reviewboard.asterisk.org/r/2717/diff/


Testing
-------

Asterisk compiles and basic calls work perfectly fine.


Thanks,

Mark Michelson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130802/b36b91e4/attachment.htm>


More information about the asterisk-dev mailing list