X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.c;h=57068bbd46784f703796a93fee550b78bb5b8991;hb=8340c342ebcfc82193c3f66e7f15047c1e37399b;hp=1a00339ac057a25cd4a010cbc6c35a1b0c6861ce;hpb=8d9ebf64c8a64bf1346685833fe79970c4ef3d14;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.c b/src/cm/du_app_mac_inf.c index 1a00339ac..57068bbd4 100644 --- a/src/cm/du_app_mac_inf.c +++ b/src/cm/du_app_mac_inf.c @@ -53,7 +53,7 @@ * RFAILED - failure * ***************************************************************************/ -uint16_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) +int packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) { if(pst->selector == DU_SELECTOR_LC) { @@ -66,15 +66,16 @@ uint16_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } /* pack the address of the structure */ CMCHKPK(cmPkPtr,(PTR)macCellCfg, mBuf); DU_LOG("\nDU-APP : MAC CELL config sent"); - RETVALUE(SPstTsk(pst,mBuf)); + return SPstTsk(pst,mBuf); } + return ROK; } /************************************************************************** @@ -95,7 +96,7 @@ uint16_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) * RFAILED - failure * ***************************************************************************/ -void unpackDuMacCellCfg( +int unpackDuMacCellCfg( DuMacCellCfgReq func, Pst *pst, Buffer *mBuf) @@ -135,21 +136,21 @@ void unpackDuMacCellCfg( * RFAILED - failure * ***************************************************************************/ -uint16_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) +int packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) { if(pst->selector == DU_SELECTOR_LC) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } /* pack the transaction ID in CNF structure */ CMCHKPK(SPkU8, macCellCfgCfm->rsp, mBuf); CMCHKPK(SPkU16, macCellCfgCfm->transId, mBuf); - RETVALUE(SPstTsk(pst,mBuf)); + return SPstTsk(pst,mBuf); } else if(pst->selector == DU_SELECTOR_LWLC) { @@ -176,7 +177,7 @@ uint16_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) * RFAILED - failure * ***************************************************************************/ -uint16_t unpackMacCellCfgCfm( +int unpackMacCellCfgCfm( DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf) @@ -189,11 +190,12 @@ uint16_t unpackMacCellCfgCfm( CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf); CMCHKUNPK(SUnpkU8, &(macCellCfgCfm.rsp), mBuf); - RETVALUE((*func)(&macCellCfgCfm)); + return (*func)(pst, &macCellCfgCfm); } else { /* only loose coupling is suported */ + return ROK; } } @@ -228,7 +230,7 @@ uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { DU_LOG("\nDU APP : Memory allocation failed for cell start req pack"); - RETVALUE(RFAILED); + return RFAILED; } /* pack the address of the structure */ @@ -307,7 +309,7 @@ uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { DU_LOG("\nDU APP : Memory allocation failed for cell stop req pack"); - RETVALUE(RFAILED); + return RFAILED; } /* pack the address of the structure */ @@ -387,7 +389,7 @@ uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { DU_LOG("\nDU APP : Memory allocation failed for cell start req pack"); - RETVALUE(RFAILED); + return RFAILED; } /* pack the address of the structure */