Modified: freeswitch/trunk/src/switch_core_state_machine.c (14312 => 14313)
--- freeswitch/trunk/src/switch_core_state_machine.c 2009-07-21 18:49:02 UTC (rev 14312)
+++ freeswitch/trunk/src/switch_core_state_machine.c 2009-07-21 19:17:22 UTC (rev 14313)
@@ -332,6 +332,7 @@
switch_thread_id_t thread_id;
jmp_buf env;
int sig, silly = 0;
+ uint32_t new_loops = 60000000;
if (switch_test_flag((&runtime), SCF_CRASH_PROT)) {
thread_id = switch_thread_self();
@@ -520,6 +521,10 @@
if (endstate == switch_channel_get_running_state(session->channel)) {
if (endstate == CS_NEW) {
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 {
switch_thread_cond_wait(session->cond, session->mutex);
}