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
2009-04-10 20:14:02 +00:00
parent ab6c4f1a6d
commit 73fe7bfdcc
9 changed files with 109 additions and 107 deletions
+25 -27
View File
@@ -835,38 +835,36 @@ switch_status_t FSConnection::on_execute()
static switch_status_t on_destroy(switch_core_session_t *session)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
//switch_channel_t *channel = switch_core_session_get_channel(session);
opal_private_t *tech_pvt = (opal_private_t *) switch_core_session_get_private(session);
if (tech_pvt->read_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->read_codec);
if (tech_pvt) {
if (tech_pvt->read_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->read_codec);
}
if (tech_pvt->write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->write_codec);
}
if (tech_pvt->vid_read_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->vid_read_codec);
}
if (tech_pvt->vid_write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->vid_write_codec);
}
if (tech_pvt->read_timer.timer_interface) {
switch_core_timer_destroy(&tech_pvt->read_timer);
}
if (tech_pvt->vid_read_timer.timer_interface) {
switch_core_timer_destroy(&tech_pvt->vid_read_timer);
}
}
if (tech_pvt->write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->write_codec);
}
if (tech_pvt->vid_read_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->vid_read_codec);
}
if (tech_pvt->vid_write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->vid_write_codec);
}
if (tech_pvt->read_timer.timer_interface) {
switch_core_timer_destroy(&tech_pvt->read_timer);
}
if (tech_pvt->vid_read_timer.timer_interface) {
switch_core_timer_destroy(&tech_pvt->vid_read_timer);
}
switch_core_session_unset_read_codec(session);
switch_core_session_unset_write_codec(session);
return SWITCH_STATUS_SUCCESS;
}
/* this function has to be called with the original session beause the FSConnection might already be destroyed and we