]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorMichael Jerris <mike@jerris.com>
Thu, 9 Apr 2009 22:43:00 +0000 (22:43 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 9 Apr 2009 22:43:00 +0000 (22:43 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12978 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_reg.c

index d98113a8d20377b8a04fcbd5f06055bb8fc5208a..39b4b2c58cd1c8fb82e2ddf4e07633ab07ec3c4e 100644 (file)
@@ -255,7 +255,7 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status,
   error:
 
 
-       if (sip->sip_event && sip->sip_event->o_type && !strcasecmp(sip->sip_event->o_type, "message-summary")) {
+       if (sip && sip->sip_event && sip->sip_event->o_type && !strcasecmp(sip->sip_event->o_type, "message-summary")) {
                /* unsolicited mwi, just say ok */
                nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
        } else {
index e59fd181a4329d10e93ed712f0ac4567e9d960f9..2c9710afd19469fa733cb2d12e2a05b2567bff8f 100644 (file)
@@ -1194,7 +1194,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                switch_event_destroy(&auth_params);
        }
 
-       return r;
+       return (uint8_t)r;
 }
 
 
@@ -1400,14 +1400,13 @@ void sofia_reg_handle_sip_r_challenge(int status,
 
        if (session) {
                private_object_t *tech_pvt;
-               switch_channel_t *channel = switch_core_session_get_channel(session);
 
                if ((tech_pvt = switch_core_session_get_private(session)) && sofia_test_flag(tech_pvt, TFLAG_REFER)) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received reply from REFER\n");
                        goto end;
                }
 
-               gw_name = switch_channel_get_variable(channel, "sip_use_gateway");
+               gw_name = switch_channel_get_variable(switch_core_session_get_channel(session), "sip_use_gateway");
        }