提交 4f9402c0 authored 作者: Peter Olsson's avatar Peter Olsson

mod_v8: Fixed line endings, and removed old code.

上级 04005dfa
...@@ -163,22 +163,12 @@ void FSEventHandler::QueueEvent(switch_event_t *event) ...@@ -163,22 +163,12 @@ void FSEventHandler::QueueEvent(switch_event_t *event)
if (send) { if (send) {
if (switch_event_dup(&clone, event) == SWITCH_STATUS_SUCCESS) { if (switch_event_dup(&clone, event) == SWITCH_STATUS_SUCCESS) {
if (switch_queue_trypush(_event_queue, clone) != SWITCH_STATUS_SUCCESS) {
if (switch_queue_trypush(_event_queue, clone) == SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Lost event to JS EventHandler, you must read the events faster!\n");
// TODO
/*if (l->lost_events) {
int le = l->lost_events;
l->lost_events = 0;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(l->session), SWITCH_LOG_CRIT, "Lost %d events!\n", le);
}*/
} else {
/*if (++l->lost_events > MAX_MISSED) {
kill_listener(l, NULL);
}*/
switch_event_destroy(&clone); switch_event_destroy(&clone);
} }
} else { } else {
////switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(l->session), SWITCH_LOG_ERROR, "Memory Error!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
} }
} }
} }
...@@ -406,12 +396,10 @@ JS_EVENTHANDLER_FUNCTION_IMPL(SendEvent) ...@@ -406,12 +396,10 @@ JS_EVENTHANDLER_FUNCTION_IMPL(SendEvent)
switch_core_session_rwunlock(session); switch_core_session_rwunlock(session);
} else { } else {
info.GetReturnValue().Set(false); info.GetReturnValue().Set(false);
// TODO LOGGING switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid session id [%s]\n", switch_str_nil(session_uuid.c_str()));
//switch_snprintf(reply, reply_len, "-ERR invalid session id [%s]", switch_str_nil(uuid));
} }
} else { } else {
/* "Normal" event */ /* "Normal" event */
// TODO LOGGING
switch_event_fire(event); switch_event_fire(event);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论