fix regex parsing in dmachine

This commit is contained in:
Anthony Minessale 2011-11-23 11:00:00 -06:00
parent 4dbc9d7cbc
commit 4ab5fd14b3

View File

@ -306,6 +306,7 @@ static dm_match_t switch_ivr_dmachine_check_match(switch_ivr_dmachine_t *dmachin
for(bp = dmachine->realm->binding_list; bp; bp = bp->next) { for(bp = dmachine->realm->binding_list; bp; bp = bp->next) {
if (bp->is_regex) { if (bp->is_regex) {
switch_status_t r_status = switch_regex_match(dmachine->digits, bp->digits); switch_status_t r_status = switch_regex_match(dmachine->digits, bp->digits);
pmatches = 1;
if (r_status == SWITCH_STATUS_SUCCESS) { if (r_status == SWITCH_STATUS_SUCCESS) {
if (is_timeout) { if (is_timeout) {
@ -313,7 +314,6 @@ static dm_match_t switch_ivr_dmachine_check_match(switch_ivr_dmachine_t *dmachin
exact_bp = bp; exact_bp = bp;
break; break;
} }
pmatches = 1;
best = DM_MATCH_PARTIAL; best = DM_MATCH_PARTIAL;
} }
} else { } else {