From: Brett Bryant Date: Thu, 9 Sep 2010 18:50:13 +0000 (+0000) Subject: Fixes an issue with dialplan pattern matching where the specificity for pattern range... X-Git-Tag: 1.6.2.14-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e05f4b7e207801c593b4a14dd1bdf2acbc817158;p=thirdparty%2Fasterisk.git Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent. (closes issue #16903) Reported by: Nick_Lewis Patches: pbx.c-specificity.patch uploaded by Nick Lewis (license 657) Tested by: Nick_Lewis git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@285710 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index aac9bb5d47..4a945e06a0 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1849,15 +1849,15 @@ static struct match_char *add_pattern_node(struct ast_context *con, struct match pattern matcher. */ m->is_pattern = is_pattern; if (specificity == 1 && is_pattern && pattern[0] == 'N') - m->specificity = 0x0802; + m->specificity = 0x0832; else if (specificity == 1 && is_pattern && pattern[0] == 'Z') - m->specificity = 0x0901; + m->specificity = 0x0931; else if (specificity == 1 && is_pattern && pattern[0] == 'X') - m->specificity = 0x0a00; + m->specificity = 0x0a30; else if (specificity == 1 && is_pattern && pattern[0] == '.') - m->specificity = 0x10000; + m->specificity = 0x18000; else if (specificity == 1 && is_pattern && pattern[0] == '!') - m->specificity = 0x20000; + m->specificity = 0x28000; else m->specificity = specificity; @@ -2127,10 +2127,10 @@ static int ext_cmp1(const char **p, unsigned char *bitwise) return 0x0900 | '1'; case '.': /* wildcard */ - return 0x10000; + return 0x18000; case '!': /* earlymatch */ - return 0x20000; /* less specific than NULL */ + return 0x28000; /* less specific than NULL */ case '\0': /* empty string */ *p = NULL;