diff --git a/openair2/LAYER2/MAC/main_ue.c b/openair2/LAYER2/MAC/main_ue.c index bed2aa5b09..324668b981 100644 --- a/openair2/LAYER2/MAC/main_ue.c +++ b/openair2/LAYER2/MAC/main_ue.c @@ -46,8 +46,6 @@ #include #include "executables/softmodem-common.h" -extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active); - void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) { //init as MR LOG_D(MAC, "[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index); diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index d53d4ea1b1..b9d2551fcb 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -2892,9 +2892,11 @@ int decode_BCCH_DLSCH_Message( if ((ctxt_pP->frame % 2) == 0) { // even frame if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&1) == 0) { + if (!UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]) { + LOG_E(PHY,"UE_rrc_inst[%d].sib1[%d] is null, allocating\n", ctxt_pP->module_id, eNB_index); + openair_rrc_ue_init(ctxt_pP->module_id, eNB_index); + } LTE_SystemInformationBlockType1_t *sib1 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]; - if (!sib1) - LOG_E(PHY,"UE_rrc_inst[%d][%d] is null\n", ctxt_pP->module_id, eNB_index); memcpy( sib1, &bcch_message->message.choice.c1.choice.systemInformationBlockType1, sizeof(LTE_SystemInformationBlockType1_t) );