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

Freeswitch SVN anthm at freeswitch.org
Thu Jul 3 12:48:05 EDT 2008


Author: anthm
Date: Thu Jul  3 12:48:05 2008
New Revision: 8888

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c

Log:
fix

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Thu Jul  3 12:48:05 2008
@@ -1073,8 +1073,8 @@
 								  TAG_END());
 		
 
-		if (strstr(tech_pvt->dest, ";fs_nat") || strstr(tech_pvt->dest, ";received") 
-			|| ((val = switch_channel_get_variable(channel, "sip_sticky_contact")) && switch_true(val))) {
+		if (tech_pvt->dest && (strstr(tech_pvt->dest, ";fs_nat") || strstr(tech_pvt->dest, ";received") 
+							   || ((val = switch_channel_get_variable(channel, "sip_sticky_contact")) && switch_true(val)))) {
 			switch_set_flag(tech_pvt, TFLAG_NAT);
 			tech_pvt->record_route = switch_core_session_strdup(tech_pvt->session, url_str);
 			route_uri = tech_pvt->record_route;
@@ -1172,7 +1172,7 @@
 
 	call_id = switch_channel_get_variable(channel, "sip_outgoing_call_id");
 
-	if ((route = strstr(tech_pvt->dest, ";fs_path="))) {
+	if (tech_pvt->dest && (route = strstr(tech_pvt->dest, ";fs_path="))) {
 		char *p;
 
 		route = switch_core_session_strdup(tech_pvt->session, route + 9);



More information about the Freeswitch-svn mailing list