From: Anthony Minessale Date: Fri, 31 Dec 2010 16:09:40 +0000 (-0600) Subject: make exact matches return sooner in dmachine X-Git-Tag: v1.2-rc1~223^2~2^2^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e897646e1557282d6cfbf6c0c66d048222f7942e;p=thirdparty%2Ffreeswitch.git make exact matches return sooner in dmachine --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 0459f2b832..5d35524e25 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -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;