git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3196 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-10-25 14:01:03 +00:00
parent 0be391132a
commit 61f7148941
2 changed files with 13 additions and 6 deletions
+12 -5
View File
@@ -1142,15 +1142,17 @@ static switch_status_t sofia_on_hangup(switch_core_session_t *session)
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
cause = switch_channel_get_cause(channel);
sip_cause = hangup_cause_to_sip(cause);
tech_pvt = (private_object_t *) switch_core_session_get_private(session);
assert(tech_pvt != NULL);
deactivate_rtp(tech_pvt);
if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
return SWITCH_STATUS_SUCCESS;
}
su_home_deinit(tech_pvt->home);
cause = switch_channel_get_cause(channel);
sip_cause = hangup_cause_to_sip(cause);
deactivate_rtp(tech_pvt);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel %s hanging up, cause: %s\n",
switch_channel_get_name(channel), switch_channel_cause2str(cause), sip_cause);
@@ -1191,6 +1193,11 @@ static switch_status_t sofia_on_hangup(switch_core_session_t *session)
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
if (tech_pvt->home) {
su_home_deinit(tech_pvt->home);
tech_pvt->home = NULL;
}
return SWITCH_STATUS_SUCCESS;
}