]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
timeout instantly when you have exact match and are equal to max digits
authorAnthony Minessale <anthm@freeswitch.org>
Sun, 17 Oct 2010 21:13:47 +0000 (16:13 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Sun, 17 Oct 2010 21:13:47 +0000 (16:13 -0500)
src/switch_ivr_async.c

index 964a77ec79fe9e67322fc7fcb52e044ff205ddcd..7959d319aba922f17976fd5b01709b17187a1bed 100644 (file)
@@ -281,6 +281,7 @@ static dm_match_t switch_ivr_dmachine_check_match(switch_ivr_dmachine_t *dmachin
                        if (!exact_bp && !strcmp(bp->digits, dmachine->digits)) {
                                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))) {