aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-01 22:45:10 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-01 22:45:10 +0000
commit7cd54efc3e469d872865896a7e075692156bab2c (patch)
tree2ac2d1d9792c50379f7c277b2f44bbd6529593a0 /main
parent12d58481a3d87cc3ce7a3598c75cdf9df326ea4d (diff)
Bumped across another test set for the new exten pattern matcher, which revealed a problem with the CANMATCH/MATCHMORE modes. Direct matches were getting in the way. Fixed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112357 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/pbx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 19c8f05cb..4a7b60576 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -1015,9 +1015,11 @@ static void new_find_extension(const char *str, struct scoreboard *score, struct
if (p->x[1] == 0 && *str >= '2' && *str <= '9' ) {
#define NEW_MATCHER_CHK_MATCH \
if (p->exten && !(*(str+1))) { /* if a shorter pattern matches along the way, might as well report it */ \
- update_scoreboard(score, length+1, spec+p->specificity, p->exten,0,callerid, p->deleted, p); \
- if (!p->deleted) \
- return; /* the first match, by definition, will be the best, because of the sorted tree */ \
+ if (action == E_MATCH) { /* if in CANMATCH/MATCHMORE, don't let matches get in the way */ \
+ update_scoreboard(score, length+1, spec+p->specificity, p->exten,0,callerid, p->deleted, p); \
+ if (!p->deleted) \
+ return; /* the first match, by definition, will be the best, because of the sorted tree */ \
+ } \
}
#define NEW_MATCHER_RECURSE \