提交 87477e30 authored 作者: Brian West's avatar Brian West

fix null pointer issue in event socket

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16012 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fa34dcce
......@@ -2016,7 +2016,6 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
switch_assert(listener != NULL);
if ((session = listener->session)) {
channel = switch_core_session_get_channel(session);
if (switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
goto done;
}
......@@ -2162,11 +2161,14 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
}
switch_mutex_unlock(listener->filter_mutex);
if (listener->session && (switch_test_flag(listener, LFLAG_RESUME) ||
((var = switch_channel_get_variable(channel, "socket_resume")) && switch_true(var)))) {
if (listener->session) {
channel = switch_core_session_get_channel(listener->session);
}
if (channel && (switch_test_flag(listener, LFLAG_RESUME) || ((var = switch_channel_get_variable(channel, "socket_resume")) && switch_true(var)))) {
switch_channel_set_state(channel, CS_RESET);
}
if (listener->sock) {
char disco_buf[512] = "";
const char message[] = "Disconnected, goodbye.\nSee you at ClueCon! http://www.cluecon.com/\n";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论