[asterisk-dev] [Code Review] Pattern matching with the '-' char.

rmudgett reviewboard at asterisk.org
Mon Nov 19 16:58:42 CST 2012


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

(Updated Nov. 19, 2012, 4:58 p.m.)


Review request for Asterisk Developers.


Changes
-------

Point out other fixes as a result of the matching cleanup.


Summary (updated)
-------

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.


This addresses bug ASTERISK-19205.
    https://issues.asterisk.org/jira/browse/ASTERISK-19205


Diffs
-----

  /branches/1.8/main/pbx.c 376499 

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/20121119/15856d6a/attachment.htm>


More information about the asterisk-dev mailing list