[Freeswitch-svn] [commit] r8518 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
mikej at freeswitch.org
Wed May 21 21:24:13 EDT 2008
Author: mikej
Date: Wed May 21 21:24:13 2008
New Revision: 8518
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
var name scope masking and code before decl
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Wed May 21 21:24:13 2008
@@ -1231,14 +1231,14 @@
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";
}
}
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 Wed May 21 21:24:13 2008
@@ -465,8 +465,8 @@
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)";
More information about the Freeswitch-svn
mailing list