X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrsch%2Fsch.c;h=ebdab07f65b4d5e4771eb577bd8f53b78375c8dc;hb=e44180890b286bf1f78cd8f3867092f0914cccec;hp=ef72d1a03b659a10e0b1a9f1b6135605e4e1769d;hpb=093afd2e854d73d697233396fb9c74ed67bdd615;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index ef72d1a03..ebdab07f6 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -900,12 +900,18 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) DU_LOG("\nDEBUG --> SCH : Received RLC BO Status indication"); cell = schCb[inst].cells[inst]; + if(cell == NULLP) + { + DU_LOG("\nERROR --> SCH : MacSchDlRlcBoInfo(): Cell does not exists"); + return RFAILED; + } + GET_UE_IDX(dlBoInfo->crnti, ueIdx); ueCb = &cell->ueCb[ueIdx-1]; lcId = dlBoInfo->lcId; if(lcId == SRB1_LCID || lcId == SRB2_LCID || lcId == SRB3_LCID || \ - (lcId >= MIN_DRB_LCID && lcId <= MAX_DRB_LCID)) + (lcId >= MIN_DRB_LCID && lcId <= MAX_DRB_LCID)) { SET_ONE_BIT(ueIdx, cell->boIndBitMap); ueCb->dlInfo.dlLcCtxt[lcId].bo = dlBoInfo->dataVolume; @@ -924,20 +930,27 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) slotIdx++; if(slotIdx==cell->numSlots) { - DU_LOG("\nERROR --> SCH : No DL Slot available"); - return RFAILED; + DU_LOG("\nERROR --> SCH : No DL Slot available"); + return RFAILED; } } #endif + schDlSlotInfo = cell->schDlSlotInfo[slot]; + if(schDlSlotInfo == NULLP) + { + DU_LOG("\nERROR --> SCH : MacSchDlRlcBoInfo(): schDlSlotInfo does not exists"); + return RFAILED; + } SCH_ALLOC(schDlSlotInfo->dlMsgInfo, sizeof(DlMsgInfo)); - if(!schDlSlotInfo->dlMsgInfo) + if(schDlSlotInfo->dlMsgInfo == NULLP) { DU_LOG("\nERROR --> SCH : Memory allocation failed for dlMsgInfo"); schDlSlotInfo = NULL; return RFAILED; } + schDlSlotInfo->dlMsgInfo->crnti = dlBoInfo->crnti; schDlSlotInfo->dlMsgInfo->ndi = 1; schDlSlotInfo->dlMsgInfo->harqProcNum = 0;