[Freeswitch-svn] [commit] r8428 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Fri May 16 00:04:41 EDT 2008


Author: mikej
Date: Fri May 16 00:04:41 2008
New Revision: 8428

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
no need to set this var twice.

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Fri May 16 00:04:41 2008
@@ -3164,12 +3164,8 @@
 			uint32_t x = 0;
 			int ok = 1;
 			char *last_acl = NULL;
-			const char *contact_host = NULL;
 
-			if (sip && sip->sip_contact && sip->sip_contact->m_url && sip->sip_contact->m_url->url_host) {
-				contact_host = sip->sip_contact->m_url->url_host;
-			}
-			if (contact_host) {
+			if (!switch_strlen_zero(contact_host)) {
 				for (x = 0 ; x < profile->nat_acl_count; x++) {
 					last_acl = profile->nat_acl[x];
 					if (!(ok = switch_check_network_list_ip(contact_host, last_acl))) {
@@ -3184,10 +3180,6 @@
 				}
 			}
 		}
-
-
-
-		
 		return;
 	}
 



More information about the Freeswitch-svn mailing list