code analysis, clean up asserts related to switch_core_session_get_channel.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7402 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-01-28 07:26:10 +00:00
parent c8dd27cdd1
commit 482badffca
44 changed files with 506 additions and 1661 deletions

View File

@@ -1620,8 +1620,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
if (switch_test_flag(&rtp_session->vad_data, SWITCH_VAD_FLAG_EVENTS_TALK)) {
switch_event_t *event;
if (switch_event_create(&event, SWITCH_EVENT_TALK) == SWITCH_STATUS_SUCCESS) {
switch_channel_t *channel = switch_core_session_get_channel(rtp_session->vad_data.session);
switch_channel_event_set_data(channel, event);
switch_channel_event_set_data(switch_core_session_get_channel(rtp_session->vad_data.session), event);
switch_event_fire(&event);
}
}
@@ -1637,8 +1636,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
if (switch_test_flag(&rtp_session->vad_data, SWITCH_VAD_FLAG_EVENTS_NOTALK)) {
switch_event_t *event;
if (switch_event_create(&event, SWITCH_EVENT_NOTALK) == SWITCH_STATUS_SUCCESS) {
switch_channel_t *channel = switch_core_session_get_channel(rtp_session->vad_data.session);
switch_channel_event_set_data(channel, event);
switch_channel_event_set_data(switch_core_session_get_channel(rtp_session->vad_data.session), event);
switch_event_fire(&event);
}
}