summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-10-08 22:12:13 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-01-28 16:25:25 +0100
commitc3dad11839792f16015c098f5c9a266c9ac8ed77 (patch)
treefe1fe6f7aa07777502e4e1c04d477dc0308a9db0
parentd27cdeee2881cd94761ebe7a21a91a7b6039e8de (diff)
bsc_init: Forget which SIs are valid for the trx.zecke/to-be-merged
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.
-rw-r--r--openbsc/src/libbsc/bsc_init.c8
1 files changed, 8 insertions, 0 deletions
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) {