X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_e2ap_msg_hdl.c;h=d8f98ba759cae1497897520e87a501f95c742540;hb=ed6746a6081339633c3baa314251fcc11b98ce10;hp=a179f18e9e7cc9248687deaa186e8c5c4a1f7c64;hpb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;p=o-du%2Fl2.git diff --git a/src/du_app/du_e2ap_msg_hdl.c b/src/du_app/du_e2ap_msg_hdl.c index a179f18e9..d8f98ba75 100644 --- a/src/du_app/du_e2ap_msg_hdl.c +++ b/src/du_app/du_e2ap_msg_hdl.c @@ -69,7 +69,7 @@ uint8_t BuildGlobalgNBId(GlobalE2node_gNB_ID_t *gNbId) else { buildPlmnId(duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrCgi.plmn, \ - &gNbId->global_gNB_ID.plmn_id); + gNbId->global_gNB_ID.plmn_id.buf); /* fill gND Id */ gNbId->global_gNB_ID.gnb_id.present = GNB_ID_Choice_PR_gnb_ID; /* Allocate Buffer size */ @@ -236,7 +236,7 @@ uint8_t BuildAndSendE2SetupReq() /* Prints the Msg formed */ xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg); - memset((uint8_t *)encBuf, 0, ENC_BUF_MAX_LEN); + memset(encBuf, 0, ENC_BUF_MAX_LEN); encBufSize = 0; encRetVal = aper_encode(&asn_DEF_E2AP_PDU, 0, e2apMsg, PrepFinalEncBuf,\ encBuf); @@ -678,7 +678,7 @@ uint8_t BuildAndSendRicSubscriptionRsp() /* Prints the Msg formed */ xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apRicMsg); - memset((uint8_t *)encBuf, 0, ENC_BUF_MAX_LEN); + memset(encBuf, 0, ENC_BUF_MAX_LEN); encBufSize = 0; encRetVal = aper_encode(&asn_DEF_E2AP_PDU, 0, e2apRicMsg, PrepFinalEncBuf,\ encBuf); @@ -1029,7 +1029,7 @@ uint8_t FillRicIndication(RICindication_t *ricIndicationMsg) else { buildPlmnId(duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrCgi.plmn, \ - &ricIndicationMsg->protocolIEs.list.array[idx]->value.choice.RICindicationHeader); + ricIndicationMsg->protocolIEs.list.array[idx]->value.choice.RICindicationHeader.buf); idx++; /* TO BE CHANGED: RIC INDICATION DATA */ /* For now filling a dummy octect data, need to tested with PRBs*/ @@ -1049,7 +1049,7 @@ uint8_t FillRicIndication(RICindication_t *ricIndicationMsg) else { buildPlmnId(duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrCgi.plmn, \ - &ricIndicationMsg->protocolIEs.list.array[idx]->value.choice.RICindicationMessage); + ricIndicationMsg->protocolIEs.list.array[idx]->value.choice.RICindicationMessage.buf); } } } @@ -1111,7 +1111,7 @@ uint8_t BuildAndSendRicIndication() } /* Prints the Msg formed */ xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg); - memset((uint8_t *)encBuf, 0, ENC_BUF_MAX_LEN); + memset(encBuf, 0, ENC_BUF_MAX_LEN); encBufSize = 0; encRetVal = aper_encode(&asn_DEF_E2AP_PDU, 0, e2apMsg, PrepFinalEncBuf,\ encBuf); @@ -1163,7 +1163,7 @@ uint8_t SendE2APMsg(Region region, Pool pool) { Buffer *mBuf=NULLP; - if(ODU_GET_MSG(region, pool, &mBuf) == ROK) + if(ODU_GET_MSG_BUF(region, pool, &mBuf) == ROK) { if(ODU_ADD_POST_MSG_MULT((Data *)encBuf, encBufSize, mBuf) == ROK) { @@ -1172,17 +1172,17 @@ uint8_t SendE2APMsg(Region region, Pool pool) if(sctpSend(mBuf, E2_INTERFACE) != ROK) { DU_LOG("\nE2AP : SCTP Send for E2 failed"); - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); return RFAILED; } } else { DU_LOG("\nE2AP : ODU_ADD_POST_MSG_MULT failed"); - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); return RFAILED; } - ODU_PUT_MSG(mBuf); + ODU_PUT_MSG_BUF(mBuf); } else { @@ -1224,7 +1224,7 @@ void E2APMsgHdlr(Buffer *mBuf) ODU_PRINT_MSG(mBuf, 0,0); /* Copy mBuf into char array to decode it */ - ODU_FIND_MSG_LEN(mBuf, &recvBufLen); + ODU_GET_MSG_LEN(mBuf, &recvBufLen); DU_ALLOC(recvBuf, (Size)recvBufLen); if(recvBuf == NULLP)