[Asterisk-code-review] pbx.c: Fix handling of '-' in extension name and callerid (asterisk[11])
Corey Farrell
asteriskteam at digium.com
Wed Jul 27 01:03:14 CDT 2016
Corey Farrell has posted comments on this change.
Change subject: pbx.c: Fix handling of '-' in extension name and callerid
......................................................................
Patch Set 2:
I believe this is ready and addresses the primary concern - failure to remove certain extensions. There are likely collateral fixes to dialplan lookup. For example if you add extension '1-000' and then try to match '1000', that will be found by hashtab lookup instead of iterating the extensions linked list.
Other code may not be so lucky, if it is saving the result of ast_get_extension_name() or ast_get_extension_cidmatch() elsewhere then requesting an extension match with them. In that case it's still possible the match will happen inefficiently or not at all, depending on how the lookup is done. One way to fix that would be to return stripped values to those two procedures, create new functions to return unstripped values for display by code outside pbx.c. I'd like to limit the scope of this patch to the current JIRA issue (failure to remove extensions). Runtime / call path related extension lookup deserves a separate look.
I've only posted this to 11 only for now, once I get +1 I'll get working on applying to 13, 14 and master. I do not expect this to apply cleanly and even if it does I will be reviewing all references to ast_exten->exten and ast_exten->cidmatch in each version.
--
To view, visit https://gerrit.asterisk.org/3353
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-HasComments: No
More information about the asterisk-code-review
mailing list