fix refactor typo

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9120 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-07-21 14:55:49 +00:00
parent 2a6b0cdcc1
commit ee44d83b0a
1 changed files with 4 additions and 2 deletions

View File

@ -268,9 +268,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
switch_frame_t *read_frame = NULL; switch_frame_t *read_frame = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS; switch_status_t status = SWITCH_STATUS_SUCCESS;
int timelimit = 60; int timelimit = 60;
const char *var = switch_channel_get_variable(caller_channel, "call_timeout"); const char *var;
switch_time_t start = 0; switch_time_t start = 0;
switch_assert(peer_channel);
if (session) { if (session) {
caller_channel = switch_core_session_get_channel(session); caller_channel = switch_core_session_get_channel(session);
} }
@ -282,7 +284,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
switch_zmalloc(write_frame.data, SWITCH_RECOMMENDED_BUFFER_SIZE); switch_zmalloc(write_frame.data, SWITCH_RECOMMENDED_BUFFER_SIZE);
write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE; write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
if (var) { if (caller_channel && (var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
timelimit = atoi(var); timelimit = atoi(var);
if (timelimit < 0) { if (timelimit < 0) {
timelimit = 60; timelimit = 60;