if valid_terminators string starts with = it implies one of them must be typed

This commit is contained in:
Anthony Minessale 2012-06-28 13:17:52 -05:00
parent 1330ad9cf4
commit ed6e7b9fc0
1 changed files with 8 additions and 0 deletions

View File

@ -1879,6 +1879,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
switch_status_t status = SWITCH_STATUS_SUCCESS; switch_status_t status = SWITCH_STATUS_SUCCESS;
size_t len = 0; size_t len = 0;
char tb[2] = ""; char tb[2] = "";
int term_required = 0;
if (*valid_terminators == '=') {
term_required = 1;
}
switch_assert(session); switch_assert(session);
@ -1945,6 +1951,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
} }
} }
} }
} else if (term_required) {
status = SWITCH_STATUS_TOO_SMALL;
} }
len = strlen(digit_buffer); len = strlen(digit_buffer);