* ****************************************************************/
uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
{
- uint8_t ret=0, ieIdx=0, ieExtIdx = 0, ueIdx=0, cellIdx=0, servCellIdx = 0;
+ int8_t ueIdx = -1;
+ uint8_t ret=0, ieIdx=0, ieExtIdx = 0, cellIdx=0, servCellIdx = 0;
bool ueCbFound = false, hoInProgress = false;
uint16_t nrCellId = 0;
uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0, bitRateSize=0;
/* If UE context is not present, but UE is in handover */
if(!ueCbFound && hoInProgress)
{
- gnbDuUeF1apId = genGnbDuUeF1apId(nrCellId);
- duUeCb = &duCb.actvCellLst[cellIdx]->hoUeCb[gnbDuUeF1apId -1];
+ ueIdx = getFreeBitFromUeBitMap(nrCellId);
+ if(ueIdx != -1)
+ gnbDuUeF1apId = ueIdx +1;
+ else
+ {
+ DU_LOG("\nERROR --> F1AP : No free UE IDX found in UE bit map of cell Id [%d]", nrCellId);
+ ret = RFAILED;
+ break;
+ }
+ duUeCb = &duCb.actvCellLst[cellIdx]->hoUeCb[ueIdx];
duUeCb->f1UeDb = NULL;
duUeCb->gnbCuUeF1apId = gnbCuUeF1apId;
duUeCb->gnbDuUeF1apId = gnbDuUeF1apId;
{
cellIdentity = &deleteItem->oldNRCGI.nRCellIdentity;
bitStringToInt(cellIdentity, &cellId);
+
+ GET_CELL_IDX(cellId, cellIdx);
+ if(duCb.actvCellLst[cellIdx] != NULLP)
+ {
+ duCb.actvCellLst[cellId-1]->cellStatus = DELETION_IN_PROGRESS;
+ }
}
}
}
- GET_CELL_IDX(cellId, cellIdx);
if(duCb.actvCellLst[cellIdx] != NULLP)
{
if(duCb.actvCellLst[cellIdx]->numActvUes == 0)
{
- duCb.actvCellLst[cellId-1]->cellStatus = DELETION_IN_PROGRESS;
ret = duSendCellDeletReq(cellId);
if(ret == RFAILED)
{
uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
{
UEContextModificationRequest_t *ueContextModifyReq = NULLP;
- uint8_t ret = ROK, ieIdx = 0, cellIdx=0, ueIdx=0;
+ uint8_t ret = ROK, ieIdx = 0, cellIdx=0;
DuUeCb *duUeCb = NULLP;
DRBs_ToBeSetupMod_List_t *drbSetupModCfg;
DRBs_ToBeModified_List_t *drbModifiedCfg;
{
if(duCb.actvCellLst[cellIdx])
{
- for(ueIdx = 0; ueIdx < duCb.actvCellLst[cellIdx]->numActvUes; ueIdx++)
+ if((duCb.actvCellLst[cellIdx]->ueCb[gnbDuUeF1apId-1].gnbDuUeF1apId == gnbDuUeF1apId)&&\
+ (duCb.actvCellLst[cellIdx]->ueCb[gnbDuUeF1apId-1].gnbCuUeF1apId == gnbCuUeF1apId))
{
- if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\
- (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
+ duUeCb = &duCb.actvCellLst[cellIdx]->ueCb[gnbDuUeF1apId-1];
+ if(duUeCb->f1UeDb == NULLP)
{
- duUeCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx];
- if(duUeCb->f1UeDb == NULLP)
- {
- DU_ALLOC(duUeCb->f1UeDb, sizeof(F1UeContextSetupDb));
- duUeCb->f1UeDb->cellIdx = cellIdx;
- duUeCb->f1UeDb->actionType = UE_CTXT_MOD;
- }
- break;
+ DU_ALLOC(duUeCb->f1UeDb, sizeof(F1UeContextSetupDb));
+ duUeCb->f1UeDb->cellIdx = cellIdx;
+ duUeCb->f1UeDb->actionType = UE_CTXT_MOD;
}
+ break;
}
}
}
break;
}while(true);
- if(ret == ROK && duCb.actvCellLst[cellId-1] && (duCb.actvCellLst[cellId-1]->numActvUes == 0))
+ if((ret == ROK) && (duCb.actvCellLst[cellId-1]) && (duCb.actvCellLst[cellId-1]->cellStatus == DELETION_IN_PROGRESS)
+ && (duCb.actvCellLst[cellId-1]->numActvUes == 0))
{
- duCb.actvCellLst[cellId-1]->cellStatus = DELETION_IN_PROGRESS;
ret = duSendCellDeletReq(cellId);
if(ret != ROK)
{