[Freeswitch-svn] [commit] r12978 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Thu Apr 9 15:43:00 PDT 2009


Author: mikej
Date: Thu Apr  9 17:43:00 2009
New Revision: 12978

Log:
tweak

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Thu Apr  9 17:43:00 2009
@@ -255,7 +255,7 @@
   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 {

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Thu Apr  9 17:43:00 2009
@@ -1194,7 +1194,7 @@
 		switch_event_destroy(&auth_params);
 	}
 
-	return r;
+	return (uint8_t)r;
 }
 
 
@@ -1400,14 +1400,13 @@
 
 	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");
 	}
 
 



More information about the Freeswitch-svn mailing list