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

FreeSWITCH SVN anthm at freeswitch.org
Mon Jun 15 09:01:45 PDT 2009


Author: anthm
Date: Mon Jun 15 11:01:45 2009
New Revision: 13774

Log:
FSCORE-382

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

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Mon Jun 15 11:01:45 2009
@@ -1395,10 +1395,14 @@
 					sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
 				}
 			} else if (code == 302 && !switch_strlen_zero(msg->string_arg)) {
-				char * p = strchr(msg->string_arg, ' ');
-				*p++ = '\0';
+				char *p;
+
+				if ((p = strchr(msg->string_arg, ' '))) {
+					*p = '\0';
+					msg->string_arg = p;
+				}
+				
 				msg->message_id = SWITCH_MESSAGE_INDICATE_REDIRECT;
-				msg->string_arg = p;
 				switch_core_session_receive_message(session, msg);
 				goto end_lock;
 			} else {



More information about the Freeswitch-svn mailing list