summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_init.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-04-16 13:33:16 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-04-16 13:35:12 +0200
commit4e526ba0f571e87fd26f243e95115bdd9c0ce230 (patch)
tree78d4577f8663bb566d41bd3b42e3b8326d2eb60e /openbsc/src/libbsc/bsc_init.c
parent53f36ba1cc42ee99a77cf31777cc87e31b283718 (diff)
ensure that acc_ramp_init() is only called once
There are plans to register signal handlers in acc_ramp_init(). Once we do that, the acc_ramp_init() function should only be called once to avoid duplicate signal handlers on the handler list. However, the acc_ramp_init() function currently serves a dual-purpose: 1) Initialize the acc_ramp structure for a bts 2) Enable or disable ACC ramping Add new functions to support use case 2, and call acc_ramp_init() just once while reading the configuration file. The VTY commands which enable/disable ACC ramping use the new APIs instead. Also, rename acc_ramp_start() to acc_ramp_trigger() and tweak its semantics so that it can always be called regardless of what the current configuration settings are. This prepares us for triggering ACC ramping upon events other than "RSL link-up". This is a port of osmo-bsc commit ea33341cf7b52d432be98f2280b4a5f3129ef667. Also remove a call to acc_ramp_init() which should have been removed in openbsc commit ebc1e39d919f5f919cb176ee9c6cbbccc8d620b1 Change-Id: Iadd25016e6478a9dc5da1db42e6192ce0f5cc746 Related: OS2591
Diffstat (limited to 'openbsc/src/libbsc/bsc_init.c')
-rw-r--r--openbsc/src/libbsc/bsc_init.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 6147257c4..120955b53 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -311,19 +311,16 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx)
trx->bts->location_area_code,
trx->bts->cell_identity, trx->bts->bsic);
- /*
- * Re-initialize ACC ramping to ensure ACCs are barred/allowed
- * according to our current VTY configuration.
- */
- acc_ramp_init(&trx->bts->acc_ramp, acc_ramp_is_enabled(&trx->bts->acc_ramp), trx->bts);
-
if (trx->bts->type == GSM_BTS_TYPE_NOKIA_SITE) {
rsl_nokia_si_begin(trx);
}
- /* Configure ACC ramping before sending system information to BTS. */
- if (acc_ramp_is_enabled(&trx->bts->acc_ramp))
- acc_ramp_start(&trx->bts->acc_ramp);
+ /*
+ * Trigger ACC ramping before sending system information to BTS.
+ * This ensures that RACH control in system information is configured correctly.
+ */
+ acc_ramp_trigger(&trx->bts->acc_ramp);
+
gsm_bts_trx_set_system_infos(trx);
if (trx->bts->type == GSM_BTS_TYPE_NOKIA_SITE) {