From: Brian West Date: Mon, 14 Jan 2008 05:29:33 +0000 (+0000) Subject: clean this code up a tiny bit. Doesn't add anything X-Git-Tag: v1.0-rc1~701 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b09849c9cd80e2fbfa921f31cb0bc528af19225;p=thirdparty%2Ffreeswitch.git clean this code up a tiny bit. Doesn't add anything git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7207 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index cdbc96ee29..97209fd306 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -120,18 +120,19 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status, tagi_t tags[]) { switch_channel_t *channel = NULL; - const char *rtp_txstat_header; - const char *rtp_rxstat_header; + if (session) { + const char *tmp; + channel = switch_core_session_get_channel(session); if (sip->sip_user_agent && !switch_strlen_zero(sip->sip_user_agent->g_string)){ switch_channel_set_variable(channel, "sip_user_agent", sip->sip_user_agent->g_string); } - if ((rtp_txstat_header = sofia_glue_get_unknown_header(sip, "rtp-txstat"))) { - switch_channel_set_variable(channel, "sip_rtp_txstat", rtp_txstat_header); + if ((tmp = sofia_glue_get_unknown_header(sip, "rtp-txstat"))) { + switch_channel_set_variable(channel, "sip_rtp_txstat", tmp); } - if ((rtp_rxstat_header = sofia_glue_get_unknown_header(sip, "rtp-rxstat"))) { - switch_channel_set_variable(channel, "sip_rtp_rxstat", rtp_rxstat_header); + if ((tmp = sofia_glue_get_unknown_header(sip, "rtp-rxstat"))) { + switch_channel_set_variable(channel, "sip_rtp_rxstat", tmp); } }