[asterisk-dev] [Code Review] 3386: Dialplan functions: Fix NULL channel safety issues
Corey Farrell
reviewboard at asterisk.org
Tue Mar 25 14:13:48 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3386/
-----------------------------------------------------------
(Updated March 25, 2014, 3:13 p.m.)
Review request for Asterisk Developers.
Changes
-------
Clear red blobs near changes in chan_sip, func_dialplan, func_groupcount and func_volume. These changes are also applied to 1.8 and 11.
Bugs: ASTERISK-23391
https://issues.asterisk.org/jira/browse/ASTERISK-23391
Repository: Asterisk
Description
-------
This is the Asterisk 12 version of fixes for dialplan functions handling of NULL channel. The patch for trunk is identical to 12. Patches for 1.8 and 11 are smaller, those patches are posted to JIRA. I can post separate reviews for 1.8 and 11 if anyone asks.
Looking to the future, I think it would be better to add a 3rd bit-field to 'struct ast_custom_function' to allow_global, have pbx.c check if channel is NULL. This would be cleaner with functions using RAII or SCOPED_CHANNELLOCK (main/features_config.c), and remove the check from a large number of functions.
Diffs (updated)
-----
/branches/12/res/res_xmpp.c 410669
/branches/12/res/res_pjsip_header_funcs.c 410669
/branches/12/res/res_mutestream.c 410669
/branches/12/res/res_jabber.c 410669
/branches/12/res/res_calendar.c 410669
/branches/12/main/message.c 410669
/branches/12/main/features_config.c 410669
/branches/12/funcs/func_volume.c 410669
/branches/12/funcs/func_strings.c 410669
/branches/12/funcs/func_speex.c 410669
/branches/12/funcs/func_pitchshift.c 410669
/branches/12/funcs/func_odbc.c 410669
/branches/12/funcs/func_math.c 410669
/branches/12/funcs/func_jitterbuffer.c 410669
/branches/12/funcs/func_groupcount.c 410669
/branches/12/funcs/func_global.c 410669
/branches/12/funcs/func_frame_trace.c 410669
/branches/12/funcs/func_dialplan.c 410669
/branches/12/funcs/func_channel.c 410669
/branches/12/funcs/func_cdr.c 410669
/branches/12/funcs/func_callerid.c 410669
/branches/12/funcs/func_callcompletion.c 410669
/branches/12/funcs/func_blacklist.c 410669
/branches/12/channels/pjsip/dialplan_functions.c 410669
/branches/12/channels/chan_sip.c 410669
/branches/12/channels/chan_iax2.c 410669
/branches/12/apps/confbridge/conf_config_parser.c 410669
/branches/12/apps/app_voicemail.c 410669
/branches/12/apps/app_stack.c 410669
/branches/12/apps/app_speech_utils.c 410669
/branches/12/apps/app_jack.c 410669
Diff: https://reviewboard.asterisk.org/r/3386/diff/
Testing
-------
Compiled, visually inspected.
I cannot compile app_jack due to dependencies, all other changed files compiled with devmode.
Thanks,
Corey Farrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140325/662b0441/attachment.html>
More information about the asterisk-dev
mailing list