FSCORE-352
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12987 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ab6c4f1a6d
commit
73fe7bfdcc
|
@ -428,14 +428,12 @@ static void remove_pvt(private_t *tech_pvt)
|
||||||
|
|
||||||
static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = NULL;
|
//switch_channel_t *channel = NULL;
|
||||||
private_t *tech_pvt = NULL;
|
//private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
//channel = switch_core_session_get_channel(session);
|
||||||
assert(channel != NULL);
|
//tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
|
||||||
assert(tech_pvt != NULL);
|
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1214,8 +1214,8 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
struct private_object *tech_pvt = NULL;
|
struct private_object *tech_pvt = NULL;
|
||||||
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
switch_assert(tech_pvt != NULL);
|
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
if (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");
|
||||||
|
@ -1229,7 +1229,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -493,8 +493,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
{
|
{
|
||||||
private_t *tech_pvt = switch_core_session_get_private(session);
|
private_t *tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
switch_assert(tech_pvt != NULL);
|
if (tech_pvt) {
|
||||||
|
|
||||||
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||||
}
|
}
|
||||||
|
@ -502,6 +501,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
if (!switch_core_codec_ready(&tech_pvt->write_codec)) {
|
if (!switch_core_codec_ready(&tech_pvt->write_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,8 +353,8 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
switch_assert(channel != NULL);
|
switch_assert(channel != NULL);
|
||||||
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
switch_assert(tech_pvt != NULL);
|
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
switch_core_timer_destroy(&tech_pvt->timer);
|
switch_core_timer_destroy(&tech_pvt->timer);
|
||||||
|
|
||||||
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
||||||
|
@ -364,6 +364,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
|
@ -835,9 +835,10 @@ switch_status_t FSConnection::on_execute()
|
||||||
|
|
||||||
static switch_status_t on_destroy(switch_core_session_t *session)
|
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);
|
opal_private_t *tech_pvt = (opal_private_t *) switch_core_session_get_private(session);
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
if (tech_pvt->read_codec.implementation) {
|
if (tech_pvt->read_codec.implementation) {
|
||||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||||
}
|
}
|
||||||
|
@ -861,12 +862,9 @@ static switch_status_t on_destroy(switch_core_session_t *session)
|
||||||
if (tech_pvt->vid_read_timer.timer_interface) {
|
if (tech_pvt->vid_read_timer.timer_interface) {
|
||||||
switch_core_timer_destroy(&tech_pvt->vid_read_timer);
|
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;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this function has to be called with the original session beause the FSConnection might already be destroyed and we
|
/* this function has to be called with the original session beause the FSConnection might already be destroyed and we
|
||||||
|
|
|
@ -195,9 +195,8 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
assert(tech_pvt != NULL);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||||
}
|
}
|
||||||
|
@ -205,6 +204,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,17 +183,17 @@ static switch_status_t channel_on_init(switch_core_session_t * session)
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static switch_status_t channel_on_hangup(switch_core_session_t * session)
|
static switch_status_t channel_on_destroy(switch_core_session_t * session)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = NULL;
|
//switch_channel_t *channel = NULL;
|
||||||
private_t *tech_pvt = NULL;
|
private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
//channel = switch_core_session_get_channel(session);
|
||||||
switch_assert(channel != NULL);
|
//switch_assert(channel != NULL);
|
||||||
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
switch_assert(tech_pvt != NULL);
|
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||||
}
|
}
|
||||||
|
@ -201,6 +201,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t * session)
|
||||||
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->write_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,6 +239,7 @@ switch_status_t sofia_on_destroy(switch_core_session_t *session)
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s SOFIA DESTROY\n", switch_channel_get_name(channel));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s SOFIA DESTROY\n", switch_channel_get_name(channel));
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
if (switch_core_codec_ready(&tech_pvt->read_codec)) {
|
||||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||||
}
|
}
|
||||||
|
@ -255,6 +256,7 @@ switch_status_t sofia_on_destroy(switch_core_session_t *session)
|
||||||
switch_mutex_unlock(tech_pvt->profile->flag_mutex);
|
switch_mutex_unlock(tech_pvt->profile->flag_mutex);
|
||||||
|
|
||||||
sofia_glue_deactivate_rtp(tech_pvt);
|
sofia_glue_deactivate_rtp(tech_pvt);
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
|
|
@ -934,18 +934,20 @@ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "unicall_on_execute(%p)\n
|
||||||
|
|
||||||
static switch_status_t unicall_on_destroy(switch_core_session_t *session)
|
static switch_status_t unicall_on_destroy(switch_core_session_t *session)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel;
|
//switch_channel_t *channel;
|
||||||
private_t *tech_pvt;
|
private_t *tech_pvt;
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
//channel = switch_core_session_get_channel(session);
|
||||||
assert(channel != NULL);
|
//assert(channel != NULL);
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
|
||||||
assert(tech_pvt != NULL);
|
|
||||||
|
|
||||||
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
|
if (tech_pvt) {
|
||||||
if (switch_core_codec_ready(&tech_pvt->read_codec))
|
if (switch_core_codec_ready(&tech_pvt->read_codec))
|
||||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||||
if (switch_core_codec_ready(&tech_pvt->write_codec))
|
if (switch_core_codec_ready(&tech_pvt->write_codec))
|
||||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue