X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_f1ap_msg_hdl.c;h=b175d4a864d4ffe7bf8f4221a588e58af9410c42;hb=6ffefa70d25f1f2e9a5879d4eb8f3af6379b54a9;hp=2a8cbad5057ddcf8cfcaca156d1dea4b10896e0d;hpb=5f2265d1147690ddea19312492150bcad7cf5c1b;p=o-du%2Fl2.git diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index 2a8cbad50..b175d4a86 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -14948,8 +14948,8 @@ void freeAperDecodeUeContextReleaseCommand(F1AP_PDU_t *f1apMsg) uint8_t procF1UeContextReleaseCommand(F1AP_PDU_t *f1apMsg) { uint8_t ieIdx=0, ret=ROK, ueIdx=0; - uint16_t cellIdx =0; - bool ueIdxFound; + uint16_t cellIdx =0, cellId = 0, crnti = 0; + bool ueIdxFound = false; uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0; DuUeCb *duUeCb = NULLP; UEContextReleaseCommand_t *ueContextReleaseCommand = NULLP; @@ -14979,11 +14979,6 @@ uint8_t procF1UeContextReleaseCommand(F1AP_PDU_t *f1apMsg) } case ProtocolIE_ID_id_Cause: - { - break; - } - - case ProtocolIE_ID_id_RRCContainer: { for(cellIdx = 0; cellIdx < MAX_NUM_CELL; cellIdx++) { @@ -14992,39 +14987,9 @@ uint8_t procF1UeContextReleaseCommand(F1AP_PDU_t *f1apMsg) if(duCb.actvCellLst[cellIdx] && (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\ (duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId)) { + cellId = duCb.actvCellLst[cellIdx]->cellId; + crnti = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].crnti; duUeCb = &duCb.actvCellLst[cellIdx]->ueCb[ueIdx]; - DU_ALLOC(duUeCb->f1UeDb, sizeof(F1UeContextSetupDb)); - if(duUeCb->f1UeDb) - { - memset(duUeCb->f1UeDb, 0, sizeof(F1UeContextSetupDb)); - duUeCb->f1UeDb->actionType = UE_CTXT_RELEASE; - duUeCb->f1UeDb->cellIdx = cellIdx; - /* Filling Dl RRC Msg Info */ - DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg)); - if(!duUeCb->f1UeDb->dlRrcMsg) - { - DU_LOG("\nERROR --> DU APP : procF1UeContextReleaseCommand(): \ - Memory allocation failed "); - ret = RFAILED; - } - else - { - duUeCb->f1UeDb->dlRrcMsgPres = true; - memset(duUeCb->f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg)); - ret = extractDlRrcMsg(gnbDuUeF1apId, gnbCuUeF1apId, duUeCb->f1UeDb->dlRrcMsg,\ - &ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->\ - value.choice.RRCContainer); - } - - } - else - { - DU_LOG("\nERROR --> DU APP : procF1UeContextReleaseCommand(): \ - Memory allocation failed "); - ret = RFAILED; - - } - ueIdxFound = true; break; } @@ -15034,13 +14999,51 @@ uint8_t procF1UeContextReleaseCommand(F1AP_PDU_t *f1apMsg) break; } } + if(!ueIdxFound) { - DU_LOG("\nERROR --> F1AP: DuUeCb is not found at procF1UeContextReleaseCommand()"); + DU_LOG("\nERROR --> F1AP: procF1UeContextReleaseCommand(): Ue Information is not available"); ret = RFAILED; } + break; + } + case ProtocolIE_ID_id_RRCContainer: + { + if(ueIdxFound == true) + { + DU_ALLOC(duUeCb->f1UeDb, sizeof(F1UeContextSetupDb)); + if(duUeCb->f1UeDb) + { + memset(duUeCb->f1UeDb, 0, sizeof(F1UeContextSetupDb)); + duUeCb->f1UeDb->actionType = UE_CTXT_RELEASE; + duUeCb->f1UeDb->cellIdx = cellIdx; + /* Filling Dl RRC Msg Info */ + DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg)); + if(!duUeCb->f1UeDb->dlRrcMsg) + { + DU_LOG("\nERROR --> DU APP : procF1UeContextReleaseCommand(): \ + Memory allocation failed "); + ret = RFAILED; + } + else + { + duUeCb->f1UeDb->dlRrcMsgPres = true; + memset(duUeCb->f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg)); + ret = extractDlRrcMsg(gnbDuUeF1apId, gnbCuUeF1apId, duUeCb->f1UeDb->dlRrcMsg,\ + &ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->\ + value.choice.RRCContainer); + } + + } + else + { + DU_LOG("\nERROR --> DU APP : procF1UeContextReleaseCommand(): \ + Memory allocation failed "); + ret = RFAILED; + } + } break; } default : @@ -15053,7 +15056,7 @@ uint8_t procF1UeContextReleaseCommand(F1AP_PDU_t *f1apMsg) } if(ret != RFAILED) { - duProcUeContextReleaseCommand(duUeCb); + duProcUeContextReleaseCommand(cellId, duUeCb); } freeAperDecodeUeContextReleaseCommand(f1apMsg); return ret;