bsc_init: Forget which SIs are valid for the trx
Previously the SI generation lead to setting the BCCH SIs for all TRX in
a multi-trx setup. This is because we create the SIs globally but
si_valid appears to be limited to the 'current' trx. Warn if we attempt
to set SIs for the BCCH on a trx that does not have a BCCH.
Change-Id: Ie0e288252a2e7709c4dae16b96a0b1512278847f
Tweaked-by: Max <msuraev@sysmocom.de>
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index b95c7b0..ec87a7b 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -119,8 +119,7 @@
rc = rsl_bcch_info(trx, i, (const uint8_t *)GSM_BTS_SI2Q(bts, j), GSM_MACBLOCK_LEN);
break;
default:
- rc = rsl_bcch_info(trx, osmo_sitype2rsl(i),
- GSM_BTS_SI(bts, i), si_len);
+ rc = rsl_bcch_info(trx, i, GSM_BTS_SI(bts, i), si_len);
break;
}
@@ -139,6 +138,9 @@
ms_pwr_ctl_lvl(bts->band, bts->ms_max_power);
bts->si_common.cell_sel_par.neci = bts->network->neci;
+ /* Zero, forget the state of the SIs */
+ bts->si_valid = 0;
+
/* First, we determine which of the SI messages we actually need */
if (trx == bts->c0) {