]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make exact matches return sooner in dmachine
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 31 Dec 2010 16:09:40 +0000 (10:09 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 31 Dec 2010 16:09:40 +0000 (10:09 -0600)
src/switch_ivr_async.c

index 0459f2b83268b990008c6230b9df9ccf8d8bc2de..5d35524e2532428cbba76dbfa74286419c07c94e 100644 (file)
@@ -282,9 +282,10 @@ static dm_match_t switch_ivr_dmachine_check_match(switch_ivr_dmachine_t *dmachin
                                best = DM_MATCH_EXACT;
                                exact_bp = bp;
                                if (dmachine->cur_digit_len == dmachine->max_digit_len) break;
-                       }
+                       } 
 
-                       if (!(both_bp && partial_bp) && !strncmp(dmachine->digits, bp->digits, strlen(dmachine->digits))) {
+                       if (!(both_bp && partial_bp) && strlen(bp->digits) != strlen(dmachine->digits) && 
+                               !strncmp(dmachine->digits, bp->digits, strlen(dmachine->digits))) {
                                if (exact_bp) {
                                        best = DM_MATCH_BOTH;
                                        both_bp = bp;