Summary: | ASTERISK-08364: [patch] logic of handle_common_options() in channel_sip.c (2 issues) | ||
Reporter: | Luigi Rizzo (rizzo) | Labels: | |
Date Opened: | 2006-12-16 14:56:27.000-0600 | Date Closed: | 2006-12-27 13:16:41.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I believe the function handle_common_options() is supposed to return 1 if it recognises an option, and 0 otherwise. However, it only does so for a subset of the options, and i am not sure whether this is intentional or a mistake. I believe the best way to fix this is add a "else return 0;" at the end of the if/elseif/ block, and then return 1; at the end of the function. Also, handle_common_options() handles some global options even while it called in the context of a specific user or peer. This should be avoided as it may cause hard-to-detect misconfigurations. I suggest to remove the general options and handle them directly in reload_config(). | ||
Comments: | By: Luigi Rizzo (rizzo) 2006-12-17 05:15:30.000-0600 a relevant patch is available as http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?r1=48540&r2=48541&makepatch=1&diff_format=u By: Olle Johansson (oej) 2006-12-27 09:46:24.000-0600 I saw this a few days ago too. It really needs to be cleaned up. By: Olle Johansson (oej) 2006-12-27 09:46:45.000-0600 Will be on the todo-list after all the bugs in the bug tracker... By: Anthony LaMantia (alamantia) 2006-12-27 12:10:13.000-0600 with a recent commit today oej preformed a cleanup of the handle_common_options code, which from his modifications seems to fix the return code problem which this issue covers. you can view his modifications here. http://svn.digium.com/view/asterisk?view=rev&rev=48981 By: Anthony LaMantia (alamantia) 2006-12-27 13:16:41.000-0600 fixed in rev: 48981 |