From fe93cf1cdce9f0e03264028b09660dc44e9b03e6 Mon Sep 17 00:00:00 2001 From: Balaji Shankaran Date: Mon, 20 Apr 2020 22:42:32 +0530 Subject: [PATCH] F1 setup request encoding fix Change-Id: I5847ba441de577bfb261a0563f476eb707d9fcc8 Signed-off-by: Balaji Shankaran --- src/codec_utils/common/odu_common_codec.h | 2 +- src/du_app/du_f1ap_msg_hdl.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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->\ -- 2.16.6