]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
var name scope masking and code before decl
authorMichael Jerris <mike@jerris.com>
Thu, 22 May 2008 01:24:13 +0000 (01:24 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 22 May 2008 01:24:13 +0000 (01:24 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8518 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index 8c5727ef3d0340abdf2773e30277e31cf25695dc..26b42d527a9b462899c66174b59834dceb05ebfd 100644 (file)
@@ -1231,14 +1231,14 @@ void sofia_presence_handle_sip_i_subscribe(int status,
                        
                if ((profile->pflags & PFLAG_AGGRESSIVE_NAT_DETECTION)) {
                        if (sip && sip->sip_via) {
-                               const char *port = sip->sip_via->v_port;
-                               const char *host = sip->sip_via->v_host;
+                               const char *v_port = sip->sip_via->v_port;
+                               const char *v_host = sip->sip_via->v_host;
                                        
-                               if (host && sip->sip_via->v_received) {
+                               if (v_host && sip->sip_via->v_received) {
                                        is_nat = "via received";
-                               } else if (host && strcmp(network_ip, host)) {
+                               } else if (v_host && strcmp(network_ip, v_host)) {
                                        is_nat = "via host";
-                               } else if (port && atoi(port) != network_port) {
+                               } else if (v_port && atoi(v_port) != network_port) {
                                        is_nat = "via port";
                                }
                        }
index 1db26a16d0eff9f43dd879983bc900f463af960c..b4c5ff777395dfb4323ba6f497c04bee3530e608 100644 (file)
@@ -465,8 +465,8 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han
        if (contact->m_url) {
                const char *port = contact->m_url->url_port;
                char new_port[25] = "";
-               display = contact->m_display;
                const char *contact_host = contact->m_url->url_host;
+               display = contact->m_display;
                
                if (is_nat) {
                        reg_desc = "Registered(AUTO-NAT)";