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.orgReview at https://gerrit.osmocom.org/4196 Fix multiple SI2q reception Previously the received SI was copied to si_buf unconditionally which means that the first SI2q message is always overwritten be the last one. Fix it moving check for SI2q ahead of generic code and moving generic copy into else branch of SI2q check. Change-Id: Ib8031d2f0e00368283a40b4aadb3eea616038d04 Related: OS#2357 --- M src/common/rsl.c 1 file changed, 18 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/96/4196/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 28dc2d0..1ebc8b2 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -292,23 +292,9 @@ len, sizeof(sysinfo_buf_t), get_value_string(osmo_sitype_strs, osmo_si)); len = sizeof(sysinfo_buf_t); } - bts->si_valid |= (1 << osmo_si); - memset(bts->si_buf[osmo_si], 0x2b, sizeof(sysinfo_buf_t)); - memcpy(bts->si_buf[osmo_si], - TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len); + LOGP(DRSL, LOGL_INFO, " Rx RSL BCCH INFO (SI%s, %u bytes)\n", get_value_string(osmo_sitype_strs, osmo_si), len); - - if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 && - num_agch(trx, "RSL") != 1) { - lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); - /* will be reactivated by sapi_deactivate_cb() */ - trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = - LCHAN_REL_ACT_REACT; - } - - if (SYSINFO_TYPE_13 == osmo_si) - pcu_tx_si13(trx->bts, true); if (SYSINFO_TYPE_2quater == osmo_si) { si2q = (struct gsm48_system_information_type_2quater *) TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO); @@ -338,7 +324,24 @@ memset(GSM_BTS_SI2Q(bts, bts->si2q_index), GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t)); memcpy(GSM_BTS_SI2Q(bts, bts->si2q_index), TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len); + } else { + memset(bts->si_buf[osmo_si], GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t)); + memcpy(bts->si_buf[osmo_si], TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len); } + + bts->si_valid |= (1 << osmo_si); + + if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 && + num_agch(trx, "RSL") != 1) { + lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); + /* will be reactivated by sapi_deactivate_cb() */ + trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_REACT; + } + + if (SYSINFO_TYPE_13 == osmo_si) + pcu_tx_si13(trx->bts, true); + } else if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) { uint16_t len = TLVP_LEN(&tp, RSL_IE_L3_INFO); if (len > sizeof(sysinfo_buf_t)) -- To view, visit https://gerrit.osmocom.org/4196 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8031d2f0e00368283a40b4aadb3eea616038d04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de>