From c3dad11839792f16015c098f5c9a266c9ac8ed77 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 8 Oct 2012 22:12:13 +0200 Subject: bsc_init: Forget which SIs are valid for the trx. The recent commit to improve 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. --- openbsc/src/libbsc/bsc_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 2fb4f1301..27faa5f73 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -130,6 +130,11 @@ static int rsl_si(struct gsm_bts_trx *trx, enum osmo_sysinfo_type i, int si_len) GSM_BTS_SI(bts, i), si_len); break; default: + if (bts->c0 != trx) + LOGP(DRR, LOGL_ERROR, + "Attempting to set BCCH SI%s on wrong BTS/TRX (%d/%d)\n", + get_value_string(osmo_sitype_strs, i), + bts->nr, trx->nr); rc = rsl_bcch_info(trx, osmo_sitype2rsl(i), GSM_BTS_SI(bts, i), si_len); break; @@ -150,6 +155,9 @@ static int set_system_infos(struct gsm_bts_trx *trx) 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) { -- cgit v1.2.3