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

FreeSWITCH SVN brian at freeswitch.org
Fri Feb 27 08:03:22 PST 2009


Author: brian
Date: Fri Feb 27 10:03:22 2009
New Revision: 12324

Log:
remove dirty hack to get around a bug in sofia which has now been fixed. And fix registering to pointers isn't allowed

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	Fri Feb 27 10:03:22 2009
@@ -2500,11 +2500,6 @@
 			}
 		}
 
-		/* dirty hack to avoid race condition in the library */
-		if (status == 200 || status == 183) {
-			switch_yield(100);// printf("Avoiding Segfault!!!\n");
-		}
-
 		if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
 
 			if (!sofia_test_flag(tech_pvt, TFLAG_SENT_UPDATE)) {

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	Fri Feb 27 10:03:22 2009
@@ -1552,6 +1552,13 @@
 
 		ret = AUTH_FORBIDDEN;
 		goto end;
+	} else {
+		const char *type = switch_xml_attr(user, "type");
+		if (type && !strcasecmp(type, "pointer")) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cant register a pointer.\n");
+			ret = AUTH_FORBIDDEN;
+			goto end;
+		}
 	}
 	
 	if (!(mailbox = (char *) switch_xml_attr(user, "mailbox"))) {



More information about the Freeswitch-svn mailing list