]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
few sofia cleanups complements of CtRiX (thanks for pointing them out)
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 29 Jan 2007 15:51:38 +0000 (15:51 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 29 Jan 2007 15:51:38 +0000 (15:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4078 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 0ddbaca63e075f4f9f687bf1c1248c5bc751dd56..28713360c7f95186f6324124dd07f2eb2c72fc6d 100644 (file)
@@ -543,12 +543,8 @@ static auth_res_t parse_auth(sofia_profile_t *profile, sip_authorization_t const
        }
 
  end:
-       if (input) {
-               switch_safe_free(input);
-       }
-       if (input2) {
-               switch_safe_free(input2);
-       }
+    switch_safe_free(input);
+    switch_safe_free(input2);
        switch_safe_free(nonce);
        switch_safe_free(uri);
        switch_safe_free(qop);
@@ -5073,6 +5069,14 @@ static switch_status_t config_sofia(int reload)
                                        }
                                }
 
+                if (!profile->sipip) {
+                    profile->sipip = switch_core_strdup(profile->pool, globals.guess_ip);
+                }
+
+                if (!profile->rtpip) {
+                    profile->rtpip = switch_core_strdup(profile->pool, globals.guess_ip);
+                }
+
                 if (profile->nonce_ttl < 60) {
                     switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting nonce TTL to 60 seconds\n");
                     profile->nonce_ttl = 60;