aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-24 04:10:57 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-24 04:14:03 +0100
commit6e92255cc7694ad02094036a87aba46c6d8ec950 (patch)
tree62ae500c61fcca169a2ac9e5913bf28c99514b7c /src/common/oml.c
parentfc169ba7bba831f00de3490c49d0e2583c29db8a (diff)
load_indication: Fix start of load indication timer
Starting the timer in bts_init() may result in it expiring already before the load indication period is set via OML. Let's make load_timer_start() safe to call several times and call it from OML code. Change-Id: I295d91413542014aa2507d5f09e01243fc3916fa Fixes: OS#2991
Diffstat (limited to 'src/common/oml.c')
-rw-r--r--src/common/oml.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 00b85f1c..75c23477 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -695,8 +695,10 @@ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg)
btsb->load.ccch.load_ind_thresh = *TLVP_VAL(&tp, NM_ATT_CCCH_L_T);
/* 9.4.11 CCCH Load Indication Period */
- if (TLVP_PRES_LEN(&tp, NM_ATT_CCCH_L_I_P, 1))
+ if (TLVP_PRES_LEN(&tp, NM_ATT_CCCH_L_I_P, 1)) {
btsb->load.ccch.load_ind_period = *TLVP_VAL(&tp, NM_ATT_CCCH_L_I_P);
+ load_timer_start(bts);
+ }
/* 9.4.44 RACH Busy Threshold */
if (TLVP_PRES_LEN(&tp, NM_ATT_RACH_B_THRESH, 1)) {