[asterisk-dev] [Code Review] Pattern matching with the '-' char.
Mark Michelson
reviewboard at asterisk.org
Mon Nov 26 18:43:43 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2201/#review7444
-----------------------------------------------------------
Ship it!
Other than some documentation oddities this looks good to go. Oh, and you didn't even introduce them.
/branches/1.8/main/pbx.c
<https://reviewboard.asterisk.org/r/2201/#comment14231>
The "minus 1" here appears to be incorrect. This doesn't appear to be due to anything new you've done, but it still should be corrected.
/branches/1.8/main/pbx.c
<https://reviewboard.asterisk.org/r/2201/#comment14232>
These return 0x18000 and 0x28000
- Mark
On Nov. 26, 2012, 4:39 p.m., rmudgett wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2201/
> -----------------------------------------------------------
>
> (Updated Nov. 26, 2012, 4:39 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> The '-' char is supposed to be ignored by the dialplan pattern matching. Unfortunately, it's treatment is not handled consistently throughout the extension matching code.
>
> * Made the old exten matching code consistently ignore '-' chars.
>
> * Made the old exten matching code consistently handle case in the matching.
>
> * Made ignore empty character sets.
>
> * Fixed ast_extension_cmp() to return -1, 0, or 1 as documented. The only user of it in pbx_lua.c was testing for -1. It was originally returning the strcmp() value for less than which is not always going to be -1.
>
> * Fix character set sorting if the sets have the same number of characters and start with the same character.
> Character set [0-9] now sorts before [02-9a] as originally intended.
>
>
> This addresses bug ASTERISK-19205.
> https://issues.asterisk.org/jira/browse/ASTERISK-19205
>
>
> Diffs
> -----
>
> /branches/1.8/UPGRADE.txt 376620
> /branches/1.8/main/pbx.c 376620
>
> Diff: https://reviewboard.asterisk.org/r/2201/diff
>
>
> Testing
> -------
>
> The failing patterns in ASTERISK-19205 now pass except for the invalid test of goto(foo-,1) for exten "_foo.".
>
>
> Thanks,
>
> rmudgett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121127/23ed8c0a/attachment-0001.htm>
More information about the asterisk-dev
mailing list