]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
close MODENDP-136
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 22 Sep 2008 14:40:13 +0000 (14:40 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 22 Sep 2008 14:40:13 +0000 (14:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9611 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index be9a5aac5cbb8856cd14a74cf4b720f54ab838a2..7f547987bb5db574fd92937fae0f9a121b487c05 100644 (file)
@@ -728,9 +728,13 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
        }
 
        if (!authorization || stale) {
-               sofia_reg_auth_challenge(nua, profile, nh, regtype, to_host, stale);
-               if (regtype == REG_REGISTER && profile->debug) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Requesting Registration from: [%s@%s]\n", to_user, to_host);
+               if (regtype == REG_REGISTER) {
+                       sofia_reg_auth_challenge(nua, profile, nh, regtype, to_host, stale);
+                       if (profile->debug) {
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Requesting Registration from: [%s@%s]\n", to_user, to_host);
+                       }
+               } else {
+                       sofia_reg_auth_challenge(nua, profile, nh, regtype, from_host, stale);
                }
                return 1;
        }