X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Flsctp.c;h=3d7895e49fc3ab86069f808e4acdef3f0f9e2f4a;hb=fc7d3ce9647a7da04f5a67fa34419076069defc1;hp=1641bc4be89208ae97f61acf57aeaf37dc5ebcd1;hpb=3f340f5742e5c7c92b8541479ee7f2d670200cfb;p=o-du%2Fl2.git diff --git a/src/cm/lsctp.c b/src/cm/lsctp.c index 1641bc4be..3d7895e49 100644 --- a/src/cm/lsctp.c +++ b/src/cm/lsctp.c @@ -43,20 +43,20 @@ uint8_t cmPkSctpNtfy(Pst *pst, CmInetSctpNotification *ntfy) if(ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - printf("\nSCTP : Failed to allocate memory"); + DU_LOG("\nERROR --> SCTP : Failed to allocate memory"); return RFAILED; } if(ntfy->header.nType == CM_INET_SCTP_ASSOC_CHANGE) { - oduUnpackUInt16(ntfy->u.assocChange.state, mBuf); - oduUnpackUInt32(ntfy->u.assocChange.assocId, mBuf); + oduPackUInt16(ntfy->u.assocChange.state, mBuf); + oduPackUInt32(ntfy->u.assocChange.assocId, mBuf); } - oduUnpackUInt16(ntfy->header.nType, mBuf); + oduPackUInt16(ntfy->header.nType, mBuf); if (ODU_POST_TASK(pst, mBuf) != ROK) { - printf("\nSCTP : ODU_POST_TASK failed while sending SCTP notification"); + DU_LOG("\nERROR --> SCTP : ODU_POST_TASK failed while sending SCTP notification"); return RFAILED; } @@ -85,11 +85,11 @@ uint8_t cmUnpkSctpNtfy(SctpNtfy func, Pst *pst, Buffer *mBuf) CmInetSctpNotification ntfy; memset(&ntfy, 0, sizeof(CmInetSctpNotification)); - oduPackUInt16(&(ntfy.header.nType), mBuf); + oduUnpackUInt16(&(ntfy.header.nType), mBuf); if(ntfy.header.nType == CM_INET_SCTP_ASSOC_CHANGE) { - oduPackUInt32(&(ntfy.u.assocChange.assocId), mBuf); - oduPackUInt16(&(ntfy.u.assocChange.state), mBuf); + oduUnpackUInt32(&(ntfy.u.assocChange.assocId), mBuf); + oduUnpackUInt16(&(ntfy.u.assocChange.state), mBuf); } return ((*func)(mBuf, &ntfy));