]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
remove dirty hack to get around a bug in sofia which has now been fixed. And fix...
authorBrian West <brian@freeswitch.org>
Fri, 27 Feb 2009 16:03:22 +0000 (16:03 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 27 Feb 2009 16:03:22 +0000 (16:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12324 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index f42f1dc8da30de757b3268254042629db52f45c3..a2ef4305683c7345e1bea5c8bf4d5383981315cf 100644 (file)
@@ -2500,11 +2500,6 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                        }
                }
 
-               /* 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)) {
index a60e9c0aa9037b2bc40d3683b95d76dd8a9c7ee8..a4389122b6b6326c8b05022aa8299923cd92f4fb 100644 (file)
@@ -1552,6 +1552,13 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
 
                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"))) {