提交 377043e0 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12718 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4dbbe79d
......@@ -32,7 +32,7 @@ Session::~Session()
if (session) {
switch_core_event_hook_remove_state_change(session, lua_hanguphook);
}
free(hangup_func_str);
switch_safe_free(hangup_func_str);
}
switch_safe_free(hangup_func_arg);
......@@ -128,6 +128,16 @@ void Session::do_hangup_hook()
if (!switch_strlen_zero(err)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s\n", err);
}
if (channel) {
switch_channel_set_private(channel, "CoreSession", NULL);
}
if (session) {
switch_core_event_hook_remove_state_change(session, lua_hanguphook);
}
switch_safe_free(hangup_func_str);
}
}
......@@ -142,7 +152,10 @@ static switch_status_t lua_hanguphook(switch_core_session_t *session_hungup)
channel = switch_core_session_get_channel(session_hungup);
if (channel) {
coresession = (Session *) switch_channel_get_private(channel, "CoreSession");
void *vs = switch_channel_get_private(channel, "CoreSession");
if (vs) {
coresession = (Session *) vs;
}
}
if (!(coresession && coresession->hook_state)) {
......
......@@ -888,6 +888,10 @@ SWITCH_DECLARE(void) CoreSession::destroy(void)
{
this_check_void();
if (channel) {
switch_channel_set_private(channel, "CoreSession", NULL);
}
switch_safe_free(xml_cdr_text);
switch_safe_free(uuid);
switch_safe_free(tts_name);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论