MODLANG-100

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12431 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-03-05 03:08:15 +00:00
parent 7abd9b3d5e
commit 7fee8a448a
1 changed files with 5 additions and 1 deletions

View File

@ -1446,7 +1446,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
switch_input_args_t args = { 0 };
switch_status_t status = SWITCH_STATUS_SUCCESS;
char terminator;
size_t len;
size_t len = 0;
switch_assert(session);
@ -1510,6 +1510,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
end:
if (max_digits == 1 && len == 1 && valid_terminators && strchr(valid_terminators, *digit_buffer)) {
*digit_buffer = '\0';
}
if (var_name && !switch_strlen_zero(digit_buffer)) {
switch_channel_set_variable(channel, var_name, digit_buffer);
}