update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12718 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4dbbe79d70
commit
377043e0ef
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue