git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7619 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-02-15 16:15:32 +00:00
parent 1f52fe1eca
commit dadace9a93
3 changed files with 7 additions and 6 deletions

View File

@ -1230,7 +1230,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
ldl_session_destroy(&tech_pvt->dlsession); ldl_session_destroy(&tech_pvt->dlsession);
} }
if (switch_rtp_ready(tech_pvt->rtp_session)) { if (tech_pvt->rtp_session) {
switch_rtp_destroy(&tech_pvt->rtp_session); switch_rtp_destroy(&tech_pvt->rtp_session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NUKE RTP\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NUKE RTP\n");
tech_pvt->rtp_session = NULL; tech_pvt->rtp_session = NULL;

View File

@ -1003,11 +1003,16 @@ void sofia_glue_deactivate_rtp(private_object_t *tech_pvt)
switch_yield(10000); switch_yield(10000);
loops++; loops++;
} }
}
if (tech_pvt->rtp_session) {
switch_rtp_destroy(&tech_pvt->rtp_session); switch_rtp_destroy(&tech_pvt->rtp_session);
} }
if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
if (tech_pvt->video_rtp_session) {
switch_rtp_destroy(&tech_pvt->video_rtp_session); switch_rtp_destroy(&tech_pvt->video_rtp_session);
} }
} }
switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force) switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force)

View File

@ -843,19 +843,15 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
} }
if (switch_test_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_SEND)) { if (switch_test_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_SEND)) {
switch_mutex_lock((*rtp_session)->flag_mutex);
srtp_dealloc((*rtp_session)->send_ctx); srtp_dealloc((*rtp_session)->send_ctx);
(*rtp_session)->send_ctx = NULL; (*rtp_session)->send_ctx = NULL;
switch_clear_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_SEND); switch_clear_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_SEND);
switch_mutex_unlock((*rtp_session)->flag_mutex);
} }
if (switch_test_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_RECV)) { if (switch_test_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_RECV)) {
switch_mutex_lock((*rtp_session)->flag_mutex);
srtp_dealloc((*rtp_session)->recv_ctx); srtp_dealloc((*rtp_session)->recv_ctx);
(*rtp_session)->recv_ctx = NULL; (*rtp_session)->recv_ctx = NULL;
switch_clear_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_RECV); switch_clear_flag((*rtp_session), SWITCH_RTP_FLAG_SECURE_RECV);
switch_mutex_unlock((*rtp_session)->flag_mutex);
} }
if ((*rtp_session)->timer.timer_interface) { if ((*rtp_session)->timer.timer_interface) {