From: Steve Murphy Date: Tue, 29 Aug 2006 23:08:42 +0000 (+0000) Subject: This change fixes bug 7820. Way back in April this bug was reintroduced, it appears... X-Git-Tag: 1.4.0-beta1~260 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=299465336a8b34d2ce81ba75343d053950344014;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/pbx.c b/main/pbx.c index 31f554acdc..522da6f64b 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -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);