[Freeswitch-branches] [commit] r13585 - freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN brian at freeswitch.org
Wed Jun 3 12:25:27 PDT 2009


Author: brian
Date: Wed Jun  3 14:25:27 2009
New Revision: 13585

Log:
 adding tls port to auto map 

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

Modified: freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c	Wed Jun  3 14:25:27 2009
@@ -768,6 +768,9 @@
 		if (switch_nat_add_mapping((switch_port_t)profile->sip_port, SWITCH_NAT_TCP) == SWITCH_STATUS_SUCCESS) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Created TCP nat mapping for %s port %d\n", profile->name, profile->sip_port);
 		}
+		if(profile->tls_sip_port && switch_nat_add_mapping((switch_port_t)profile->tls_sip_port, SWITCH_NAT_TCP) == SWITCH_STATUS_SUCCESS) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Created TCP/TLS nat mapping for %s port %d\n", profile->name, profile->tls_sip_port);
+		}
 	}
 
 	profile->nua = nua_create(profile->s_root,	/* Event loop */
@@ -956,6 +959,9 @@
 		if (switch_nat_del_mapping((switch_port_t)profile->sip_port, SWITCH_NAT_TCP) == SWITCH_STATUS_SUCCESS) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Deleted TCP nat mapping for %s port %d\n", profile->name, profile->sip_port);
 		}
+		if(profile->tls_sip_port && switch_nat_del_mapping((switch_port_t)profile->tls_sip_port, SWITCH_NAT_TCP) == SWITCH_STATUS_SUCCESS) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Deleted TCP/TLS nat mapping for %s port %d\n", profile->name, profile->tls_sip_port);
+		}
 	}
 
 	sofia_glue_sql_close(profile);



More information about the Freeswitch-branches mailing list