mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
var name scope masking and code before decl
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8518 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
91e270907b
commit
3c2e987d47
@ -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";
|
||||
}
|
||||
}
|
||||
|
@ -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)";
|
||||
|
Loading…
x
Reference in New Issue
Block a user