From 6e92255cc7694ad02094036a87aba46c6d8ec950 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 24 Feb 2018 04:10:57 +0100 Subject: 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 --- src/common/oml.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common/oml.c') 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)) { -- cgit v1.2.3