{
SEARCH_DU_DB(duIdx, duId, duDb);
SEARCH_CELL_DB(cellIdx, duDb, nrCellId, cellCb);
- for(ueIdx = 0; ueIdx < cellCb->numUe; ueIdx++)
+ if(cellCb->numUe == 0)
{
- CU_FREE(cellCb->ueCb[ueIdx]->f1apMsgDb.duToCuContainer.buf, cellCb->ueCb[ueIdx]->f1apMsgDb.duToCuContainer.size);
- memset(cellCb->ueCb[ueIdx], 0, sizeof(CuUeCb));
+ memset(cellCb, 0, sizeof(CuCellCb));
+ duDb->numCells--;
}
+ else
+ cellCb->cellStatus = CELL_DELETION_IN_PROGRESS;
}
-
return ROK;
}
cellCb = &duDb->cellCb[duDb->numCells];
memset(cellCb, 0, sizeof(CuCellCb));
cellCb->nrCellId = nrCellId;
+ cellCb->cellStatus = CELL_ACTIVE;
duDb->numCells++;
}
}
{
gnbDuUeF1apId = ueReleaseComplete->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
ueCb = &duDb->ueCb[gnbDuUeF1apId-1];
-
- for(ueIdx = 0; ueIdx < ueCb->cellCb->numUe; ueIdx++)
+ for(ueIdx = 0; ueIdx <MAX_NUM_UE; ueIdx++)
{
- if((ueCb->cellCb->ueCb[ueIdx]->gnbCuUeF1apId == gnbCuUeF1apId) &&
- (ueCb->cellCb->ueCb[ueIdx]->gnbDuUeF1apId == gnbDuUeF1apId))
+ if(ueCb->cellCb && ueCb->cellCb->ueCb[ueIdx])
{
- ueCb->cellCb->ueCb[ueIdx] = NULLP;
- ueCb->cellCb->numUe--;
- break;
-
+ if((ueCb->cellCb->ueCb[ueIdx]->gnbCuUeF1apId == gnbCuUeF1apId) &&
+ (ueCb->cellCb->ueCb[ueIdx]->gnbDuUeF1apId == gnbDuUeF1apId))
+ {
+ ueCb->cellCb->ueCb[ueIdx] = NULLP;
+ ueCb->cellCb->numUe--;
+ if((ueCb->cellCb->numUe == 0) && (ueCb->cellCb->cellStatus = CELL_DELETION_IN_PROGRESS))
+ {
+ memset(ueCb->cellCb, 0, sizeof(CuCellCb));
+ duDb->numCells--;
+ }
+ break;
+ }
}
}
memset(ueCb, 0, sizeof(CuUeCb));
uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
{
int8_t ueIdx = -1;
- uint8_t ret=0, ieIdx=0, ieExtIdx = 0, cellIdx=0, servCellIdx = 0;
+ uint8_t ret=0, ieIdx=0, ieExtIdx = 0, servCellIdx = 0;
bool ueCbFound = false, hoInProgress = false;
- uint16_t nrCellId = 0;
+ uint16_t nrCellId = 0, cellIdx=0;
uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0, bitRateSize=0;
DuUeCb *duUeCb = NULL;
UEContextSetupRequest_t *ueSetReq = NULL;