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

Mark Michelson reviewboard at asterisk.org
Tue Jul 30 18:01:39 CDT 2013


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

Review request for Asterisk Developers.


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/20130730/fd9e314b/attachment-0001.htm>


More information about the asterisk-dev mailing list