mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
This change fixes bug 7820. Way back in April this bug was reintroduced, it appears, when a bunch of restructuring was done. This code was basically left out during the restructuring. In the case of the failure in 7820, it is trying to match the extension _x. with _x., and failing, because the 'x' should only match 0 thru 9. I **could** upgrade the code so that that N,Z, and X match not only their intended number ranges, but also N,Z,and X respectively. And, moreover, X could also match N and Z, and Z could also match N. I have no idea why this bug took so long to turn up. I have no idea what a more thorough treatment of the code would do to working code, either. So I left it as it ***was***.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -739,6 +739,9 @@ enum ext_match_t {
|
||||
static int _extension_match_core(const char *pattern, const char *data, enum ext_match_t mode)
|
||||
{
|
||||
mode &= E_MATCH_MASK; /* only consider the relevant bits */
|
||||
|
||||
if (!strcasecmp(pattern,data)) /* note: if this test is left out, then _x. will not match _x. !!! */
|
||||
return 1;
|
||||
|
||||
if (pattern[0] != '_') { /* not a pattern, try exact or partial match */
|
||||
int ld = strlen(data), lp = strlen(pattern);
|
||||
|
Reference in New Issue
Block a user