X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_e2ap_msg_hdl.c;h=b01fcb2fb3aacd78554ab57fcdba32b25dc26606;hb=52ca0cf30806914e2f44054932cd2300f12aded8;hp=6c18c397381cc4bfec55099cb9f4868267d5e52c;hpb=5bca27d3d33c085718de6e894b875c845d7456d2;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 6c18c3973..b01fcb2fb 100644 --- a/src/du_app/du_e2ap_msg_hdl.c +++ b/src/du_app/du_e2ap_msg_hdl.c @@ -57,7 +57,7 @@ uint8_t BuildGlobalgNBId(GlobalE2node_gNB_ID_t *gNbId) { uint8_t unused = 0; uint8_t byteSize = 4; - uint8_t val = 1; + uint8_t gnbId = 1; uint8_t ret = ROK; /* Allocate Buffer size */ @@ -72,22 +72,22 @@ uint8_t BuildGlobalgNBId(GlobalE2node_gNB_ID_t *gNbId) else { buildPlmnId(duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrCgi.plmn, \ - gNbId->global_gNB_ID.plmn_id.buf); + 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 */ gNbId->global_gNB_ID.gnb_id.choice.gnb_ID.size = byteSize * sizeof(uint8_t); gNbId->global_gNB_ID.gnb_id.choice.gnb_ID.buf = NULLP; DU_ALLOC(gNbId->global_gNB_ID.gnb_id.choice.gnb_ID.buf, \ - gNbId->global_gNB_ID.gnb_id.choice.gnb_ID.size); + gNbId->global_gNB_ID.gnb_id.choice.gnb_ID.size); if(gNbId->global_gNB_ID.gnb_id.choice.gnb_ID.buf == NULLP) { - DU_LOG("\nERROR --> E2AP: Memory allocation failed for gnb buffer"); - ret = RFAILED; + DU_LOG("\nERROR --> E2AP: Memory allocation failed for gnb buffer"); + ret = RFAILED; } else { - fillBitString(&gNbId->global_gNB_ID.gnb_id.choice.gnb_ID, unused, byteSize, val); + fillBitString(&gNbId->global_gNB_ID.gnb_id.choice.gnb_ID, unused, byteSize, gnbId); } } return ret; @@ -476,10 +476,12 @@ uint8_t BuildAndSendE2SetupReq() else { DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for E2SetupRequest\n"); +#ifdef DEBUG_ASN_PRINT for(int i=0; i< encBufSize; i++) { printf("%x",encBuf[i]); } +#endif } if(SendE2APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK) { @@ -841,10 +843,12 @@ uint8_t BuildAndSendRicSubscriptionRsp() else { DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for RIC subscription response \n"); +#ifdef DEBUG_ASN_PRINT for(int i=0; i< encBufSize; i++) { printf("%x",encBuf[i]); } +#endif } if(SendE2APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK) @@ -1367,10 +1371,12 @@ uint8_t BuildAndSendRicIndication() else { DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for RIC Indication Message \n"); +#ifdef DEBUG_ASN_PRINT for(int i=0; i< encBufSize; i++) { printf("%x",encBuf[i]); } +#endif } if(SendE2APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK) @@ -1570,10 +1576,12 @@ uint8_t BuildAndSendE2NodeConfigUpdate() else { DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for E2nodeConfigurationUpdate\n"); +#ifdef DEBUG_ASN_PRINT for(int i=0; i< encBufSize; i++) { printf("%x",encBuf[i]); } +#endif } if(SendE2APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK) { @@ -1633,11 +1641,13 @@ void E2APMsgHdlr(Buffer *mBuf) return; } +#ifdef DEBUG_ASN_PRINT printf("\nDEBUG --> E2AP : Received flat buffer to be decoded : "); for(i=0; i< recvBufLen; i++) { printf("%x",recvBuf[i]); } +#endif /* Decoding flat buffer into E2AP messsage */ e2apMsg = &e2apasnmsg;