[svn-commits] mmichelson: branch mmichelson/sip_options r394020 - /team/mmichelson/sip_opti...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 10 16:46:01 CDT 2013


Author: mmichelson
Date: Wed Jul 10 16:46:00 2013
New Revision: 394020

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394020
Log:
Some cleanup of system configuration.

* Added doxygen for struct fields
* Changed from ints to unsigned ints
* Allow lower timert1 than the default


Modified:
    team/mmichelson/sip_options/res/res_sip/config_system.c

Modified: team/mmichelson/sip_options/res/res_sip/config_system.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_options/res/res_sip/config_system.c?view=diff&rev=394020&r1=394019&r2=394020
==============================================================================
--- team/mmichelson/sip_options/res/res_sip/config_system.c (original)
+++ team/mmichelson/sip_options/res/res_sip/config_system.c Wed Jul 10 16:46:00 2013
@@ -25,14 +25,18 @@
 #include "asterisk/sorcery.h"
 #include "include/res_sip_private.h"
 
+#define TIMER_T1_MIN 100
 #define DEFAULT_TIMER_T1 500
 #define DEFAULT_TIMER_B 32000
 
 struct system_config {
 	SORCERY_OBJECT(details);
-	int timert1;
-	int timerb;
-	int compactheaders;
+	/*! Transaction Timer T1 value */
+	unsigned int timert1;
+	/*! Transaction Timer B value */
+	unsigned int timerb;
+	/*! Should we use short forms for headers? */
+	unsigned int compactheaders;
 };
 
 static struct ast_sorcery *system_sorcery;
@@ -53,9 +57,9 @@
 	struct system_config *system = obj;
 	int min_timerb;
 
-	if (system->timert1 < DEFAULT_TIMER_T1) {
-		ast_log(LOG_WARNING, "Timer T1 setting is too low. Setting to %d\n", DEFAULT_TIMER_T1);
-		system->timert1 = DEFAULT_TIMER_T1;
+	if (system->timert1 < TIMER_T1_MIN) {
+		ast_log(LOG_WARNING, "Timer T1 setting is too low. Setting to %d\n", TIMER_T1_MIN);
+		system->timert1 = TIMER_T1_MIN;
 	}
 
 	min_timerb = 64 * system->timert1;




More information about the svn-commits mailing list