[asterisk-commits] murf: trunk r41283 - /trunk/main/pbx.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Aug 29 16:08:43 MST 2006
Author: murf
Date: Tue Aug 29 18:08:42 2006
New Revision: 41283
URL: http://svn.digium.com/view/asterisk?rev=41283&view=rev
Log:
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***.
Modified:
trunk/main/pbx.c
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?rev=41283&r1=41282&r2=41283&view=diff
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Aug 29 18:08:42 2006
@@ -739,6 +739,9 @@
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);
More information about the asterisk-commits
mailing list