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

@@ -38,12 +38,9 @@
SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec)
{
switch_event_t *event;
switch_channel_t *channel;
switch_channel_t *channel = switch_core_session_get_channel(session);
char tmp[30];
switch_assert(session != NULL);
channel = switch_core_session_get_channel(session);
if (switch_event_create(&event, SWITCH_EVENT_CODEC) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(session->channel, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-read-codec-name", "%s", codec->implementation->iananame);
@@ -75,12 +72,9 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_read_codec(switch_core_
SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec)
{
switch_event_t *event;
switch_channel_t *channel;
switch_channel_t *channel = switch_core_session_get_channel(session);
char tmp[30];
switch_assert(session != NULL);
channel = switch_core_session_get_channel(session);
if (switch_event_create(&event, SWITCH_EVENT_CODEC) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(session->channel, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-write-codec-name", "%s", codec->implementation->iananame);