X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcu_stub%2Fcu_stub_egtp.c;h=c53bc6d925212d6880db75a4a200292b64c6c402;hb=4a17bf308d12edf226ccfbe0d728ab68d5e19622;hp=ba51369906b8c861fb9e622c323cb6024edc499f;hpb=500ba7b760f08ed1967fa7c36ca013675d1abfd5;p=o-du%2Fl2.git diff --git a/src/cu_stub/cu_stub_egtp.c b/src/cu_stub/cu_stub_egtp.c index ba5136990..c53bc6d92 100644 --- a/src/cu_stub/cu_stub_egtp.c +++ b/src/cu_stub/cu_stub_egtp.c @@ -295,7 +295,6 @@ S16 cuEgtpTnlAdd(uint32_t duId, EgtpTnlEvt tnlEvt) return RFAILED; } - memset(teidCb, 0, sizeof(EgtpTeIdCb)); teidCb->teId = tnlEvt.lclTeid; teidCb->remTeId = tnlEvt.remTeid; @@ -687,9 +686,9 @@ S16 cuEgtpDecodeHdr(Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint16_t cuEgtpDatReq(uint8_t teId) +uint16_t cuEgtpDatReq(uint32_t duId, uint8_t teId) { - uint8_t ret = ROK, cnt = 0, duId =0; + uint8_t ret = ROK, cnt = 0; EgtpMsg egtpMsg; egtpMsg.msgHdr.teId = teId; @@ -699,26 +698,23 @@ uint16_t cuEgtpDatReq(uint8_t teId) DU_LOG("\nERROR --> EGTP : DRB not created"); return RFAILED ; } - for(duId = 1; duId<=egtpCb.numDu; duId++) + /* Build Application message that is supposed to come from app to egtp */ + ret = BuildAppMsg(duId, &egtpMsg); + if(ret != ROK) { - /* Build Application message that is supposed to come from app to egtp */ - ret = BuildAppMsg(duId, &egtpMsg); - if(ret != ROK) - { - DU_LOG("\nERROR --> EGTP : Failed to build App Msg"); - return RFAILED; - } + DU_LOG("\nERROR --> EGTP : Failed to build App Msg"); + return RFAILED; + } - /* Encode EGTP header to build final EGTP message */ - ret = BuildEgtpMsg(duId, &egtpMsg); - if(ret != ROK) - { - DU_LOG("\nERROR --> EGTP : Failed to build EGTP Msg"); - return RFAILED; - } - cuEgtpSendMsg(duId, egtpMsg.msg); - ODU_PUT_MSG_BUF(egtpMsg.msg); + /* Encode EGTP header to build final EGTP message */ + ret = BuildEgtpMsg(duId, &egtpMsg); + if(ret != ROK) + { + DU_LOG("\nERROR --> EGTP : Failed to build EGTP Msg"); + return RFAILED; } + cuEgtpSendMsg(duId, egtpMsg.msg); + ODU_PUT_MSG_BUF(egtpMsg.msg); return ROK; }