diff options
author | Max <msuraev@sysmocom.de> | 2017-06-15 14:59:20 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-06-15 16:39:55 +0200 |
commit | 8b1a2f8cd7a81c6b8c7cdb0963dcf89de7c46100 (patch) | |
tree | bea26194de9bc7af60d12f8ea04e193bd591c669 /openbsc/src/libbsc/abis_rsl.c | |
parent | 70fdd24d04a37217724ec8f12873e292b10e5e4d (diff) |
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>
Diffstat (limited to 'openbsc/src/libbsc/abis_rsl.c')
-rw-r--r-- | openbsc/src/libbsc/abis_rsl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 7ee19a7cd..6ae790f6c 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -226,11 +226,16 @@ static void lchan_deact_tmr_cb(void *data) /* Send a BCCH_INFO message as per Chapter 8.5.1 */ -int rsl_bcch_info(struct gsm_bts_trx *trx, uint8_t type, - const uint8_t *data, int len) +int rsl_bcch_info(const struct gsm_bts_trx *trx, enum osmo_sysinfo_type si_type, const uint8_t *data, int len) { struct abis_rsl_dchan_hdr *dh; + const struct gsm_bts *bts = trx->bts; struct msgb *msg = rsl_msgb_alloc(); + uint8_t type = osmo_sitype2rsl(si_type); + + if (bts->c0 != trx) + LOGP(DRR, LOGL_ERROR, "Attempting to set BCCH SI%s on wrong BTS%u/TRX%u\n", + get_value_string(osmo_sitype_strs, si_type), bts->nr, trx->nr); dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof*dh); init_dchan_hdr(dh, RSL_MT_BCCH_INFO); |