From 48e42f13a3c24cb348ff81dfe59a9ab116591382 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 14 Jul 2021 09:42:27 +0200 Subject: [PATCH] mac_nr: only request first 2 SIBs from RRC --- srsenb/src/stack/mac/nr/mac_nr.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/srsenb/src/stack/mac/nr/mac_nr.cc b/srsenb/src/stack/mac/nr/mac_nr.cc index 650b2e7cb..5668ea225 100644 --- a/srsenb/src/stack/mac/nr/mac_nr.cc +++ b/srsenb/src/stack/mac/nr/mac_nr.cc @@ -82,12 +82,16 @@ int mac_nr::cell_cfg(srsenb::sched_interface::cell_cfg_t* cell_cfg) cfg = *cell_cfg; // read SIBs from RRC (SIB1 for now only) - for (int i = 0; i < srsenb::sched_interface::MAX_SIBS; i++) { + for (int i = 0; i < 1 /* srsenb::sched_interface::MAX_SIBS */; i++) { if (cell_cfg->sibs->len > 0) { sib_info_t sib = {}; sib.index = i; sib.periodicity = cell_cfg->sibs->period_rf; sib.payload = srsran::make_byte_buffer(); + if (sib.payload == nullptr) { + logger.error("Couldn't allocate PDU in %s().", __FUNCTION__); + return SRSRAN_ERROR; + } if (rrc->read_pdu_bcch_dlsch(sib.index, sib.payload) != SRSRAN_SUCCESS) { logger.error("Couldn't read SIB %d from RRC", sib.index); }