[PATCH] openbsc[master]: bsc_init: Forget which SIs are valid for the trx

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Thu Jun 1 11:45:48 UTC 2017


Review at  https://gerrit.osmocom.org/2819

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 at sysmocom.de>
---
M openbsc/src/libbsc/bsc_init.c
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/19/2819/1

diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index caec800..138a67f 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -115,6 +115,10 @@
 				       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;
@@ -135,6 +139,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) {

-- 
To view, visit https://gerrit.osmocom.org/2819
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0e288252a2e7709c4dae16b96a0b1512278847f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list