]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-2789 fix secondary issue with min_digits = 0 and terminator key pressed to cancel
authorJeff Lenk <jeff@jefflenk.com>
Wed, 22 Dec 2010 04:15:03 +0000 (22:15 -0600)
committerJeff Lenk <jeff@jefflenk.com>
Wed, 22 Dec 2010 04:15:03 +0000 (22:15 -0600)
src/switch_ivr_play_say.c

index 710c0a738cd7b576c9bbe93ec57e78b0cec2d606..b983d5ed91f8760c7432ad5bb1d60a3b0c26e840 100644 (file)
@@ -1874,6 +1874,11 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
                        status = SWITCH_STATUS_SUCCESS;
                }
 
+               if ((min_digits == 0) && (strlen(digit_buffer) == 0) && switch_channel_get_variable(channel, SWITCH_READ_TERMINATOR_USED_VARIABLE) != 0)
+               {
+                       return SWITCH_STATUS_SUCCESS;
+               }
+
                if (!(status == SWITCH_STATUS_TOO_SMALL && strlen(digit_buffer) == 0)) {
                        if (status == SWITCH_STATUS_SUCCESS) {
                                if (!zstr(digit_buffer)) {