F1 setup request encoding fix 35/3335/1
authorBalaji Shankaran <balaji.shankaran@radisys.com>
Mon, 20 Apr 2020 17:12:32 +0000 (22:42 +0530)
committerBalaji Shankaran <balaji.shankaran@radisys.com>
Mon, 20 Apr 2020 17:13:29 +0000 (22:43 +0530)
Change-Id: I5847ba441de577bfb261a0563f476eb707d9fcc8
Signed-off-by: Balaji Shankaran <balaji.shankaran@radisys.com>
src/codec_utils/common/odu_common_codec.h
src/du_app/du_f1ap_msg_hdl.c

index 4d16da3..a428f27 100644 (file)
@@ -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 
index af4782b..7240beb 100644 (file)
@@ -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->\