diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2021-11-09 15:02:50 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2021-11-15 13:34:15 +0100 |
commit | 4b706fa15d3c528080b79559f4658905bdf52045 (patch) | |
tree | b01851c37389de9e1597e1bcbcd1cdc257853e40 | |
parent | c122c10f34edc6090af66440170386cc614229a0 (diff) |
osmo_bsc_main: call bootstrap_bts when OML TEI comes up
At the moment check_bts and bootstrap_bts is called only once on startup.
When a new BTS is set up during runtime bootstrap_bts, nor check_bts is
called. This means that some parameters of the BTS stay uninitalized
until osmo-bsc is restarted. Lets rather call check_bts() and then
bootstrap_bts() when the OML TEI of the BTS comes up.
Change-Id: Ie599f809623efd6ea4ab3f39294195fc1ef84b85
Related: SYS#5369
-rw-r--r-- | src/osmo-bsc/osmo_bsc_main.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index fae2ef2ad..ae9bd69e6 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -477,6 +477,7 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal, { struct input_signal_data *isd = signal_data; struct gsm_bts_trx *trx = isd->trx; + int rc; if (subsys != SS_L_INPUT) return -EINVAL; @@ -489,9 +490,24 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal, /* Generate Mobile Allocation bit-masks for all timeslots. * This needs to be done here, because it's used for TS configuration. */ generate_ma_for_bts(trx->bts); + /* Check parameters and apply vty config dependent parameters */ + rc = check_bts(trx->bts); + if (rc < 0) { + LOGP(DNM, LOGL_ERROR, "(bts=%u) Error in BTS configuration -- cannot bootstrap BTS\n", + trx->bts->nr); + return rc; + } + bootstrap_bts(trx->bts); } - if (isd->link_type == E1INP_SIGN_RSL) + if (isd->link_type == E1INP_SIGN_RSL) { + rc = check_bts(trx->bts); + if (rc < 0) { + LOGP(DNM, LOGL_ERROR, "(bts=%u) Error in BTS configuration -- cannot bootstrap RSL\n", + trx->bts->nr); + return rc; + } bootstrap_rsl(trx); + } break; case S_L_INP_TEI_DN: LOG_TRX(trx, DLMI, LOGL_ERROR, "Lost E1 %s link\n", e1inp_signtype_name(isd->link_type)); |