From: Balaji Shankaran Date: Mon, 20 Apr 2020 17:12:32 +0000 (+0530) Subject: F1 setup request encoding fix X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=fe93cf1cdce9f0e03264028b09660dc44e9b03e6;hp=5d64905a366e340b65b01021ec4eec4f7350a94e;p=o-du%2Fl2.git F1 setup request encoding fix Change-Id: I5847ba441de577bfb261a0563f476eb707d9fcc8 Signed-off-by: Balaji Shankaran --- diff --git a/src/codec_utils/common/odu_common_codec.h b/src/codec_utils/common/odu_common_codec.h index 4d16da3a2..a428f2714 100644 --- a/src/codec_utils/common/odu_common_codec.h +++ b/src/codec_utils/common/odu_common_codec.h @@ -30,7 +30,7 @@ #include "BIT_STRING.h" #include "asn_codecs.h" -#define ENC_BUF_MAX_LEN 200 +#define ENC_BUF_MAX_LEN 400 #define ENCODE_FAIL -1 typedef struct PlmnIdentity diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index af4782b24..7240beb10 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -805,7 +805,7 @@ S16 BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) /* SIB1 */ srvCellItem->gNB_DU_System_Information->sIB1_message.size =\ - encBufSize; + duCfgParam.srvdCellLst[0].duSysInfo.sib1Len; DU_ALLOC(srvCellItem->gNB_DU_System_Information->sIB1_message.buf, srvCellItem->gNB_DU_System_Information->sIB1_message.size); if(!srvCellItem->gNB_DU_System_Information->sIB1_message.buf) @@ -819,7 +819,8 @@ S16 BuildServedCellList(GNB_DU_Served_Cells_List_t *duServedCell) duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg[x]; } /* Free memory */ - DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, encBufSize); + DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, + srvCellItem->gNB_DU_System_Information->sIB1_message.size); DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.mibMsg, strlen(duCfgParam.srvdCellLst[0].duSysInfo.mibMsg)); RETVALUE(ROK); @@ -1264,6 +1265,10 @@ S16 BuildAndSendF1SetupReq() encBuf); /* Clean up */ #if 0 + DU_FREE(srvCellItem->gNB_DU_System_Information->sIB1_message.buf, + srvCellItem->gNB_DU_System_Information->sIB1_message.size); + DU_FREE(srvCellItem->gNB_DU_System_Information->mIB_message.buf, + srvCellItem->gNB_DU_System_Information->mIB_message.size); DU_FREE(srvCellItem->served_Cell_Information.\ measurementTimingConfiguration.buf,sizeof(U8)); DU_FREE(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->\