[asterisk-commits] twilson: branch twilson/config_work r366502 - /team/twilson/config_work/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 14 17:55:36 CDT 2012


Author: twilson
Date: Mon May 14 17:55:32 2012
New Revision: 366502

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366502
Log:
Just use the udptl_config

Modified:
    team/twilson/config_work/main/udptl.c

Modified: team/twilson/config_work/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/main/udptl.c?view=diff&rev=366502&r1=366501&r2=366502
==============================================================================
--- team/twilson/config_work/main/udptl.c (original)
+++ team/twilson/config_work/main/udptl.c Mon May 14 17:55:32 2012
@@ -1421,32 +1421,31 @@
 
 static int udptl_pre_apply_config(void) {
 	struct udptl_config *cfg = cfg_info.new_config;
-	struct udptl_global_options *new_global = cfg->general;
-
-	if (!new_global) {
+
+	if (!cfg->general) {
 		return -1;
 	}
 
 #ifndef SO_NO_CHECK
-	if (new_global->nochecksums) {
+	if (cfg->general->nochecksums) {
 		ast_log(LOG_WARNING, "Disabling UDPTL checksums is not supported on this operating system!\n");
-		new_global->nochecksums = 0;
+		cfg->general->nochecksums = 0;
 	}
 #endif
 
 	/* Fix up any global config values that we can handle before replacing the config */
-	if (new_global->use_even_ports && (new_global->start & 1)) {
-		++new_global->start;
-		ast_log(LOG_NOTICE, "Odd numbered udptlstart specified but use_even_ports enabled. udptlstart is now %d\n", new_global->start);
-	}
-	if (new_global->start > new_global->end) {
+	if (cfg->general->use_even_ports && (cfg->general->start & 1)) {
+		++cfg->general->start;
+		ast_log(LOG_NOTICE, "Odd numbered udptlstart specified but use_even_ports enabled. udptlstart is now %d\n", cfg->general->start);
+	}
+	if (cfg->general->start > cfg->general->end) {
 		ast_log(LOG_WARNING, "Unreasonable values for UDPTL start/end ports; defaulting to %s-%s.\n", STR(DEFAULT_UDPTLSTART), STR(DEFAULT_UDPTLEND));
-		new_global->start = DEFAULT_UDPTLSTART;
-		new_global->end = DEFAULT_UDPTLEND;
-	}
-	if (new_global->use_even_ports && (new_global->end & 1)) {
-		--new_global->end;
-		ast_log(LOG_NOTICE, "Odd numbered udptlend specified but use_even_ports enabled. udptlend is now %d\n", new_global->end);
+		cfg->general->start = DEFAULT_UDPTLSTART;
+		cfg->general->end = DEFAULT_UDPTLEND;
+	}
+	if (cfg->general->use_even_ports && (cfg->general->end & 1)) {
+		--cfg->general->end;
+		ast_log(LOG_NOTICE, "Odd numbered udptlend specified but use_even_ports enabled. udptlend is now %d\n", cfg->general->end);
 	}
 
 	return 0;




More information about the asterisk-commits mailing list