提交 e897646e authored 作者: Anthony Minessale's avatar Anthony Minessale

make exact matches return sooner in dmachine

上级 24febbea
......@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论