提交 9bd81e0f authored 作者: Anthony Minessale's avatar Anthony Minessale

timeout calls stuck in CS_NEW after 1 minute

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14313 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 f95c3256
...@@ -332,6 +332,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) ...@@ -332,6 +332,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
switch_thread_id_t thread_id; switch_thread_id_t thread_id;
jmp_buf env; jmp_buf env;
int sig, silly = 0; int sig, silly = 0;
uint32_t new_loops = 60000000;
if (switch_test_flag((&runtime), SCF_CRASH_PROT)) { if (switch_test_flag((&runtime), SCF_CRASH_PROT)) {
thread_id = switch_thread_self(); thread_id = switch_thread_self();
...@@ -520,6 +521,10 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) ...@@ -520,6 +521,10 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
if (endstate == switch_channel_get_running_state(session->channel)) { if (endstate == switch_channel_get_running_state(session->channel)) {
if (endstate == CS_NEW) { if (endstate == CS_NEW) {
switch_cond_next(); switch_cond_next();
if (!--new_loops) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%s Timeout waiting for next instruction in CS_NEW!\n", session->uuid_str);
switch_channel_hangup(session->channel, SWITCH_CAUSE_INVALID_CALL_REFERENCE);
}
} else { } else {
switch_thread_cond_wait(session->cond, session->mutex); switch_thread_cond_wait(session->cond, session->mutex);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论