FSCORE-352

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12987 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2009-04-10 20:14:02 +00:00
1 parent ab6c4f1a6d
commit 73fe7bfdcc
9 files changed
+109 -107

No files matched your search

+14 -14
View File
@@ -1214,23 +1214,23 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
struct private_object *tech_pvt = NULL;
tech_pvt = switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL);
if (tech_pvt->rtp_session) {
switch_rtp_destroy(&tech_pvt->rtp_session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NUKE RTP\n");
tech_pvt->rtp_session = NULL;
if (tech_pvt) {
if (tech_pvt->rtp_session) {
switch_rtp_destroy(&tech_pvt->rtp_session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NUKE RTP\n");
tech_pvt->rtp_session = NULL;
}
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
switch_core_codec_destroy(&tech_pvt->read_codec);
}
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
switch_core_codec_destroy(&tech_pvt->write_codec);
}
}
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
switch_core_codec_destroy(&tech_pvt->read_codec);
}
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
switch_core_codec_destroy(&tech_pvt->write_codec);
}
return SWITCH_STATUS_SUCCESS;
}