GSM timers: User reasonable defaults; don't save if equal default
A number of the GSM timers (including T3109) had no reasonable
default values if not specified in the VTY / config file. Together
with unconditional writing to the config file, this created
config files with a persistent setting for important timers as '0'.
To make things worse, many of our example cofig files suffered from the
same problem.
Let's avoid this from happening by
* having reasonable defaults if nothing specified in the config file
* conditionally savingg timers only if they differ from default
* reject any timer values that state zero during start-up (see previous
commit)
Change-Id: Iaac0bfca423852b61d8b9eb1438157ef00d0d8c8
Closes: OS#2380
diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index c307fee..02823c9 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -323,10 +323,18 @@
GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
};
-#define GSM_T3101_DEFAULT 10
-#define GSM_T3105_DEFAULT 40
+#define GSM_T3101_DEFAULT 10 /* s */
+#define GSM_T3103_DEFAULT 5 /* s */
+#define GSM_T3105_DEFAULT 100 /* ms */
+#define GSM_T3107_DEFAULT 5 /* s */
+#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */
+#define GSM_T3111_DEFAULT 2 /* s */
#define GSM_T3113_DEFAULT 60
+#define GSM_T3115_DEFAULT 10
+#define GSM_T3117_DEFAULT 10
+#define GSM_T3119_DEFAULT 10
#define GSM_T3122_DEFAULT 10
+#define GSM_T3141_DEFAULT 10
struct gsm_tz {
int override; /* if 0, use system's time zone instead. */