fix refactor typo
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9120 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2a6b0cdcc1
commit
ee44d83b0a
|
@ -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_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
int timelimit = 60;
|
||||
const char *var = switch_channel_get_variable(caller_channel, "call_timeout");
|
||||
const char *var;
|
||||
switch_time_t start = 0;
|
||||
|
||||
switch_assert(peer_channel);
|
||||
|
||||
if (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);
|
||||
write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
|
||||
|
||||
if (var) {
|
||||
if (caller_channel && (var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
|
||||
timelimit = atoi(var);
|
||||
if (timelimit < 0) {
|
||||
timelimit = 60;
|
||||
|
|
Loading…
Reference in New Issue