Trigger_macCellCfg
[o-du/l2.git] / src / 5gnrmac / rg_lmm.c
index 0e74458..7c72755 100755 (executable)
@@ -57,6 +57,7 @@ static int RLOG_MODULE_ID=4096;
 #include "rgr.h"           /* LRG Interface defines */
 #include "rg.h"            /* MAC defines */
 #include "rg_err.h"        /* MAC error defines */
+#include "du_log.h"
 
 /* header/extern include files (.x) */
 #include "gen.x"           /* general */
@@ -130,13 +131,13 @@ RgMngmt       *cfm,
 Pst           *cfmPst
 ));
 
-extern U16 cmPackMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
+extern U16 packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
 
-packMacCellCfgCfm packMacCellCfmOpts[] =
+packMacCellCfgConfirm packMacCellCfmOpts[] =
 {
-   cmPackMacCellCfgCfm,      /* packing for loosely coupled */
+   packMacCellCfgCfm,      /* packing for loosely coupled */
    duHandleMacCellCfgCfm,      /* packing for tightly coupled */
-   cmPackMacCellCfgCfm,    /* packing for light weight loosly coupled */
+   packMacCellCfgCfm,    /* packing for light weight loosly coupled */
 };
 \f
 /**
@@ -2133,6 +2134,14 @@ S16 MacHdlCellCfgReq
    Inst inst = pst->dstInst;
 
    cellCb = rgCb[inst].cell;
+   MAC_ALLOC(cellCb,sizeof(RgCellCb));
+
+   if(cellCb == NULLP)
+   {
+      DU_LOG("\nMAC : cellCb is NULL at handling of macCellCfg\n");
+      return RFAILED;
+   }
+
    memcpy(&cellCb->macCellCfg,macCellCfg,sizeof(MacCellCfg));
 
    macCellCfgFillCfmPst(pst,&cnfPst);