X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_f1ap_msg_hdl.c;h=d9b5022d7203baee5c51c38fc260cad6bc698c5e;hb=203a75d30fe226a5496af4a0bc50ea0671e32df3;hp=a8c6d541c1839dfa462acad2d6750a8fc90cbf11;hpb=a50cee433ee06d6a8a4215c274432ab4ad8fdb26;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 a8c6d541c..d9b5022d7 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -18,6 +18,7 @@ /* This file contains F1AP message handler functions */ #include "common_def.h" +#include "du_tmr.h" #include "ckw.h" #include "ckw.x" #include "kwu.h" @@ -1755,23 +1756,22 @@ uint8_t BuildAndSendF1SetupReq() printf("%x",encBuf[ieIdx]); } #endif + - duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize = encBufSize; - DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, encBufSize); - if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP) - { - DU_LOG("\nERROR --> F1AP : Memory allocation failed to store the encoding of f1setup req"); - return RFAILED; - } - memcpy(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, &encBuf, duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize); } - + /* Sending msg */ if(sendF1APMsg() != ROK) { DU_LOG("\nERROR --> F1AP : Sending F1 Setup request failed"); break; } + + if(fillE2NodeComponentReqInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_ADD, encBufSize, encBuf) !=ROK) + { + DU_LOG("\nERROR --> F1AP : Failed to add the e2 node in the list"); + break; + } ret=ROK; break; @@ -2764,12 +2764,19 @@ uint8_t BuildAndSendDUConfigUpdate(ServCellAction servCellAction) } #endif } + /* Sending msg */ if(sendF1APMsg() != ROK) { DU_LOG("\nERROR --> F1AP : Sending GNB-DU Config Update failed"); break; } + + if(fillE2NodeComponentReqInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_UPDATE, encBufSize, encBuf)!=ROK) + { + DU_LOG("\nERROR --> F1AP : Failed to update the e2 node in the list"); + break; + } ret = ROK; break; @@ -15548,15 +15555,12 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf) duProcF1SetupRsp(); freeAperDecodeF1SetupRsp(f1SetRspMsg); - - duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize = recvBufLen; - DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize); - if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP) + + if(fillE2NodeComponentRspInfo(F1, duCfgParam.duId, E2_NODE_COMPONENT_ADD, recvBufLen, recvBuf) !=ROK) { - DU_LOG("\nERROR --> F1AP : Memory allocation failed to store the buf of F1setup response"); + DU_LOG("\nERROR --> F1AP : Failed to add the e2 node in the list"); return RFAILED; } - memcpy(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, recvBuf, recvBufLen); if(BuildAndSendE2SetupReq() != ROK) { @@ -15734,11 +15738,12 @@ uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId) * * Functionality: added free part for the memory allocated by aper_decoder * -* @params[in] F1AP_PDU_t *f1apMsg +* @params[in] F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf * @return void * * ****************************************************************/ -uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg) + +uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf) { uint8_t ieIdx=0,transId=0; GNBDUConfigurationUpdateAcknowledge_t *gnbDuAck = NULLP; @@ -15781,6 +15786,13 @@ uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg) #endif freeAperDecodeGnbDuAck(gnbDuAck); + + if(fillE2NodeComponentRspInfo(F1,duCfgParam.duId, E2_NODE_COMPONENT_UPDATE, recvBufLen, recvBuf) !=ROK) + { + DU_LOG("\nERROR --> F1AP : Failed to update the e2 node in the list"); + return RFAILED; + } + return ROK; } /****************************************************************** @@ -17963,7 +17975,7 @@ void F1APMsgHdlr(Buffer *mBuf) case SuccessfulOutcome__value_PR_GNBDUConfigurationUpdateAcknowledge: { - procF1GNBDUCfgUpdAck(f1apMsg); + procF1GNBDUCfgUpdAck(f1apMsg, recvBufLen, recvBuf); break; }