\f
/* header include files (.h) */
-#include "envopt.h" /* environment options */
-#include "envdep.h" /* environment dependent */
-#include "envind.h" /* environment independent */
-
-#include "gen.h" /* general */
-#include "ssi.h" /* system services interface */
+#include "common_def.h"
#include "cm_inet.h" /* socket library file */
/*cm_inet_c_001.main_35 : Updated for C++ compilation */
#endif /* __cplusplus */
/* header/extern include files (.x) */
-#include "gen.x" /* general */
-#include "ssi.x" /* system services interface */
#include "cm_inet.x" /* socket library file */
-#include "cm_lib.x" /* lib library file */
#ifdef NTL_LIB
#include "ntl_lib.h"
#endif
-#include "du_log.h"
\f
/* local defines */
uint16_t port /* port number */
)
{
- S32 ret;
- uint32_t cnt;
+ int32_t tempErrorNo=0;
+ S32 ret =0;
+ uint32_t cnt=0;
/* cm_inet_c_001.main_46: Removed SS_LINUX flag */
- S32 idx;
+ S32 idx=0;
/* cm_inet_c_001.main_64: New variable used as an argument for sctp_connectx */
#ifdef SCTP_CONNECTX_NEW
#endif /* CMINET_SUN_CONNECTX */
#endif /* SS_LINUX */
-
+ tempErrorNo = INET_ERR_CODE;
if (ret == INET_ERR)
{
#ifdef CMINETDBG
/* cm_inet_c_001.main_54: CMINETLOGERROR added insted of SDisp */
/* cm_inet_c_001.main_62:Warning fix */
snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "CmInetSctpConnectx() Failed : error(%d), port(0x%1x),"
- " sockFd->fd(%ld)\n", INET_ERR_CODE, port, sockFd->fd);
+ " sockFd->fd(%ld)\n", tempErrorNo, port, sockFd->fd);
CMINETLOGERROR(ERRCLS_DEBUG, ECMINET010, 0, prntBuf);
#else
DU_LOG("\nCmInetSctpConnectx() Failed : error(%d), port(0x%1x),\
- sockFd->fd(%d)\n", INET_ERR_CODE, port, sockFd->fd);
+ sockFd->fd(%d)\n", tempErrorNo, port, sockFd->fd);
#endif /*ALIGN_64BIT*/
#endif /* CMINETDBG */
- switch (INET_ERR_CODE)
+ switch (tempErrorNo)
{
/* non-blocking: connection is in progress */
case ERR_INPROGRESS:
MsgLen msgLen = 0; /* message length */
MsgLen bufLen = 0; /* send buffer length */
Data *sendBuf = NULLP; /* plain send buffer */
- uint32_t flags;
+ uint32_t flags =0;
CmInetSockAddr *sockAddrPtr = NULLP;
/* cm_inet_c_001.main_58 : Fix for klockwork issue */
MsgLen sockAddrLen = 0;
- struct sockaddr_in addr;
+ struct sockaddr_in addr ={0};
#ifdef IPV6_SUPPORTED
#ifdef SUN_KSCTP
S8 *addrString = NULLP;
uint32_t addrLen = 0;
S8 ipv4Format[23] = "::ffff:";
- CmInetIpAddr ipv4NetAddr;
+ CmInetIpAddr ipv4NetAddr = {0};
#endif /* SUN_KSCTP */
- struct sockaddr_in6 addr6;
+ struct sockaddr_in6 addr6 ={0};
#endif /* IPV6_SUPPORTED */
-
#if (ERRCLASS & ERRCLS_INT_PAR)
/* error check on parameters */
if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd)
{
return RFAILED;
}
- ret = SGetSBuf(info->region, info->pool, &sendBuf, bufLen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, &sendBuf, bufLen);
if (ret != ROK)
{
return (ROUTRES);
ret = SCpyMsgFix(mBuf, 0, bufLen, sendBuf, &msgLen);
if ((ret != ROK) || (msgLen != bufLen))
{
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
return RFAILED;
}
{
if (sockFd->protType == AF_INET)
{
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
#ifdef CMINETDBG
#ifndef ALIGN_64BIT
/* cm_inet_c_001.main_54: CMINETLOGERROR added insted of SDisp */
ppId, flags, strmId, ttl, context);
if (ret == INET_ERR)
{
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
#ifdef CMINETDBG
#ifndef ALIGN_64BIT
/* cm_inet_c_001.main_54: CMINETLOGERROR added insted of SDisp */
*len = (MsgLen)ret;
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
return ROK;
}
buflen = CM_INET_MAX_MSG_LEN;
/* allocate flat receive buffer */
- ret = SGetSBuf(meminfo->region, meminfo->pool, &recvbuf, buflen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,meminfo->region, meminfo->pool, &recvbuf, buflen);
if (ret != ROK)
{
#ifdef CMINETDBG
if (ret == INET_ERR)
{
/* cleanup */
- SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,meminfo->region, meminfo->pool, recvbuf, buflen);
#ifdef CMINETDBG
#ifndef ALIGN_64BIT
/* cm_inet_c_001.main_54: CMINETLOGERROR added insted of SDisp */
/* cm_inet_c_001.main_46: Allocate memory for data before copying */
datlen = cmStrlen(sctpNtfy->sn_remote_error.sre_data) + 1;
- ret = SGetSBuf( meminfo->region, meminfo->pool, \
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__, meminfo->region, meminfo->pool, \
&ntfy->u.remoteErr.data, datlen );
if( ret != ROK )
{
/* cm_inet_c_001.main_46: Allocate memory for data before copying */
datlen = cmStrlen(sctpNtfy->sn_send_failed.ssf_data) + 1;
- ret = SGetSBuf( meminfo->region, meminfo->pool, \
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__, meminfo->region, meminfo->pool, \
&ntfy->u.sndFailed.data, datlen );
if( ret != ROK )
{
ret = SGetMsg(meminfo->region, meminfo->pool, mBuf);
if (ret != ROK)
{
- SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,meminfo->region, meminfo->pool, recvbuf, buflen);
return RFAILED;
}
if (ret != ROK)
{
SPutMsg(*mBuf);
- SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,meminfo->region, meminfo->pool, recvbuf, buflen);
return RFAILED;
}
}
/* cleanup */
- SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,meminfo->region, meminfo->pool, recvbuf, buflen);
return ROK;
}
)
{
#if (defined(WIN32) || defined(CMINETFLATBUF))
- S32 ret; /* temporary return value */
- MsgLen msgLen; /* message length */
- MsgLen bufLen; /* send buffer length */
- Data *sendBuf; /* plain send buffer */
-#else
- S32 ret; /* temporary return value */
- S32 retVal; /* temporary return value */
- S16 i; /* loop index */
- CmInetIovec txArr[CM_INET_MAX_DBUF]; /* scatter vector */
- S16 numDBufs; /* number of dBufs in message */
- struct msghdr msg; /* sendmsg() message header */
- MsgLen msgLen; /* message length */
- uint32_t strtEndDBufNum; /* starting/ending DBuf number */
- MsgLen unSentLen; /* sent len */
+ S32 ret =0; /* temporary return value */
+ MsgLen msgLen =0; /* message length */
+ MsgLen bufLen =0; /* send buffer length */
+ Data *sendBuf =0; /* plain send buffer */
+#else
+ S32 ret =0; /* temporary return value */
+ S32 retVal =0; /* temporary return value */
+ S16 i =0; /* loop index */
+ CmInetIovec txArr[CM_INET_MAX_DBUF] = {{0}}; /* scatter vector */
+ S16 numDBufs =0; /* number of dBufs in message */
+ struct msghdr msg ={0}; /* sendmsg() message header */
+ MsgLen msgLen =0; /* message length */
+ uint32_t strtEndDBufNum =0; /* starting/ending DBuf number */
+ MsgLen unSentLen =0; /* sent len */
#ifdef IPV6_SUPPORTED
- uint32_t curMsgIdx; /* indx in cmsgData where to write an ext hdr */
+ uint32_t curMsgIdx =0; /* indx in cmsgData where to write an ext hdr */
/* added for IPv6 ext hdr */
#if (defined(SS_LINUX) || defined(_XPG4_2))
/* alloc from stack for IPv6 ancill data */
- uint8_t cmsgData[CM_INET_IPV6_ANCIL_DATA];
+ uint8_t cmsgData[CM_INET_IPV6_ANCIL_DATA]= {0};
#endif /* SS_LINUX || _XPG4_2 */
#else
- uint32_t curMsgIdx; /* indx in cmsgData where to write an ext hdr */
+ uint32_t curMsgIdx =0; /* indx in cmsgData where to write an ext hdr */
#if (defined(SS_LINUX) || defined(_XPG4_2))
/* alloc from stack for IPv4 ancill data */
- uint8_t cmsgData[CM_INET_IPV4_ANCIL_DATA];
+ uint8_t cmsgData[CM_INET_IPV4_ANCIL_DATA]={0};
#endif /* SS_LINUX || _XPG4_2 */
#endif /* IPV6_SUPPORTED */
#endif /* WIN32 | CMINETFLATBUF */
- struct sockaddr_in remAddr; /* remote Internet address */
+ struct sockaddr_in remAddr ={0}; /* remote Internet address */
#ifdef IPV6_SUPPORTED
- struct sockaddr_in6 remAddr6; /* remote Internet address */
+ struct sockaddr_in6 remAddr6 = {0}; /* remote Internet address */
#endif /* IPV8_SUPPORTED */
- CmInetSockAddr *sockAddrPtr;
+ CmInetSockAddr *sockAddrPtr = NULLP;
/* cm_inet_c_001.main_58 : Fix for klockwork issue */
- uint32_t sizeOfAddr;
+ uint32_t sizeOfAddr =0;
/* cm_inet_c_001.main_50 - Added for partial send handling */
/* cm_inet_c_001.main_59: Protected under if not defined WIN32*/
#if (!defined(WIN32))
- MsgLen ioLen;
+ MsgLen ioLen =0;
#endif
{
return RFAILED;
}
- ret = SGetSBuf(info->region, info->pool, &sendBuf, bufLen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, &sendBuf, bufLen);
if (ret != ROK)
{
return (ROUTRES);
if ((ret != ROK) || (msgLen != bufLen))
{
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
return RFAILED;
}
if (ret == INET_ERR)
{
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
if(INET_ERR_CODE == ERR_AGAIN)
{
if (ret < bufLen)
{
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
return (RWOULDBLOCK);
}
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
#else /* end of Win NT/flat buffer specific part */
ret = SFndLenMsg(mBuf, &msgLen);
S32 ret; /* temporary return value */
S32 retVal; /* temporary return value */
S16 i; /* loop index */
- CmInetIovec txArr[CM_INET_MAX_DBUF]; /* scatter vector */
+ CmInetIovec txArr[CM_INET_MAX_DBUF] ={{0}}; /* scatter vector */
S16 numDBufs; /* number of dBufs in message */
struct msghdr msg; /* sendmsg() message header */
MsgLen msgLen; /* message length */
{
return RFAILED;
}
- ret = SGetSBuf(info->region, info->pool, &sendBuf, bufLen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, &sendBuf, bufLen);
if (ret != ROK)
{
return (ROUTRES);
if ((ret != ROK) || (msgLen != bufLen))
{
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
return RFAILED;
}
if (ret == INET_ERR)
{
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
if(INET_ERR_CODE == ERR_AGAIN)
{
if (ret < bufLen)
{
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
return (RWOULDBLOCK);
}
/* cleanup */
- SPutSBuf(info->region, info->pool, sendBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, sendBuf, bufLen);
#else /* end of Win NT/flat buffer specific part */
ret = SFndLenMsg(mBuf, &msgLen);
}
/* allocate mem needed to hold all HBH/Dest options */
- ret = SGetSBuf(info->region, info->pool,
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool,
(Data **)&hbhOptsArr->hbhOpts,
(Size)((sizeof(CmInetIpv6HBHHdr)) * numOpts));
if (ret != ROK)
{
/* take care of all other options having valid value field
* such as Router Alert, PADN >= 3 bytes and Jumbo */
- ret = SGetSBuf(info->region, info->pool,
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool,
(Data **)&hbhOptsArr->hbhOpts[optsIdx].value,
(Size)hbhOptsArr->hbhOpts[optsIdx].length);
if (ret != ROK)
snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "SPutSBuf call 1 in BuildRecvHopOptsArr\n");
CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET030, 0, prntBuf);
#endif /* CMINETDBG */
- SPutSBuf(info->region, info->pool,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool,
(Data *)hbhOptsArr->hbhOpts[optsIdx - 1].value,
(Size)hbhOptsArr->hbhOpts[optsIdx - 1].length);
}
snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "SPutSBuf call 2 in BuildRecvHopOptsArr\n");
CMINETLOGERROR(ERRCLS_DEBUG, ECMINET031, 0, prntBuf);
#endif /* CMINETDBG */
- SPutSBuf(info->region, info->pool,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool,
(Data *)hbhOptsArr->hbhOpts, numOpts * sizeof(CmInetIpv6HBHHdr));
hbhOptsArr->numHBHOpts = 0;
hbhOptsArr->hbhOpts = NULLP;
/* subtract 8 bytes for Next Hdr, Hdr Ext Len, .... + SL bit map */
rtOptsArr->numAddrs = (rtDataLen - 8)/16;
- ret = SGetSBuf(info->region, info->pool,
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool,
(Data **)&rtOptsArr->ipv6Addrs,
(Size)rtOptsArr->numAddrs * 16);
if (ret != ROK)
)
{
#if (defined(WIN32) || defined(CMINETFLATBUF))
- S32 ret; /* temporary return value */
- uint32_t pendLen; /* pending data length */
- S32 recvLen; /* number of received octets by recvmsg() */
- MsgLen bufLen; /* entire number of received octets */
- MsgLen curLen; /* current number of octets in buffer */
- Data *recvBuf; /* receive buffer */
- Data *bufPtr; /* current buffer position */
- Buffer *mBuf; /* received message */
- uint32_t remAddrLen; /* length of remote address */
- struct sockaddr_in *remAddr; /* remote Internet address */
+ S32 ret = 0; /* temporary return value */
+ uint32_t pendLen =0; /* pending data length */
+ S32 recvLen =0; /* number of received octets by recvmsg() */
+ MsgLen bufLen =0; /* entire number of received octets */
+ MsgLen curLen =0; /* current number of octets in buffer */
+ Data *recvBuf =NULLP; /* receive buffer */
+ Data *bufPtr =NULLP; /* current buffer position */
+ Buffer *mBuf = NULLP; /* received message */
+ uint32_t remAddrLen =0; /* length of remote address */
+ struct sockaddr_in *remAddr = {0}; /* remote Internet address */
#ifdef IPV6_SUPPORTED
- struct sockaddr_in6 *remAddr6; /* remote Internet address */
- struct sockaddr_in6 remSockAddr; /* to get packet's source IP address */
+ struct sockaddr_in6 *remAddr6 = {0}; /* remote Internet address */
+ struct sockaddr_in6 remSockAddr ={0}; /* to get packet's source IP address */
#else
- CmInetSockAddr remSockAddr; /* to get packet's source IP address */
+ CmInetSockAddr remSockAddr ={0}; /* to get packet's source IP address */
#endif /* IPV6_SUPPORTED */
#else
- S32 ret; /* temporary return value */
+ S32 ret =0; /* temporary return value */
/* cm_inet_c_001.main_58: Fix for g++ compilation warning */
- uint16_t i; /* index */
- uint32_t pendLen; /* pending data length */
- S32 numBuf; /* number of allocated dBufs */
- S32 recvLen; /* number of received octets by recvmsg() */
- MsgLen bufLen; /* entire number of received octets */
- struct msghdr msg; /* message header */
+ uint16_t i =0; /* index */
+ uint32_t pendLen =0; /* pending data length */
+ S32 numBuf =0; /* number of allocated dBufs */
+ S32 recvLen =0; /* number of received octets by recvmsg() */
+ MsgLen bufLen =0; /* entire number of received octets */
+ struct msghdr msg = {0}; /* message header */
/* cm_inet_c_001.main_54: Fix for Klockworks issue */
Buffer *tempMsg = NULLP; /* temporary message */
- CmInetIovec rxArr[CM_INET_MAX_DBUF]; /* dynamic gather array */
+ CmInetIovec rxArr[CM_INET_MAX_DBUF]= {{0}}; /* dynamic gather array */
Buffer **dBufs = NULLP; /* dynamic array with allocated dBufs */
- S16 numDBufs; /* number of allocated dBufs */
+ S16 numDBufs =0; /* number of allocated dBufs */
/* cm_inet_c_001.main_55: As remAddrLen is only being used when
* WIN32 or CMINETFLATBUF is defined, then Removed variable
* in else part*/
- struct sockaddr_in *remAddr; /* remote Internet address */
+ struct sockaddr_in *remAddr = {0}; /* remote Internet address */
#ifdef IPV6_SUPPORTED
- struct sockaddr_in6 *remAddr6; /* remote Internet address */
- struct sockaddr_in6 remSockAddr;/* to get packet's source IP address */
+ struct sockaddr_in6 *remAddr6 ={0}; /* remote Internet address */
+ struct sockaddr_in6 remSockAddr ={0};/* to get packet's source IP address */
/* added for IPv6 ext headers support */
#ifdef IPV6_OPTS_SUPPORTED
- CmInetIpv6RtHdr0 rtHdr0; /* type 0 route header */
+ CmInetIpv6RtHdr0 rtHdr0 ={0}; /* type 0 route header */
#endif /* IPV6_OPTS_SUPPORTED */
#ifdef LOCAL_INTF
- struct in6_pktinfo *pkt6Info; /* IPv6 IP_PKTINFO */
+ struct in6_pktinfo *pkt6Info = {0}; /* IPv6 IP_PKTINFO */
#endif /* LOCAL_INTF */
#if (defined(SS_LINUX) || defined(_XPG4_2))
/* from stack for IPv6 ancill data */
#endif
#else
- CmInetSockAddr remSockAddr; /* to get packet's src IP address */
+ CmInetSockAddr remSockAddr ={0}; /* to get packet's src IP address */
#if (defined(SS_LINUX) || defined(_XPG4_2))
uint8_t ancillData[CM_INET_IPV4_ANCIL_DATA];
/* from stack for IPv4 ancill data */
}
/* allocate flat receive buffer */
- ret = SGetSBuf(info->region, info->pool, &recvBuf, bufLen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, &recvBuf, bufLen);
if (ret != ROK)
{
return (ROUTRES);
{
/* cleanup */
/* moved cleanup here */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
/* added check ERR_WOULDBLOCK */
if ((INET_ERR_CODE == ERR_AGAIN) ||
if ((sockFd->type == CM_INET_DGRAM) && (*len == 0))
#endif
{
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
return (ROKDNA);
}
CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET068, 0, prntBuf);
#endif /*ALIGN_64BIT*/
#endif
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
return (ROKDNA);
}
if (ret != ROK)
{
/* cleanup */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
return (ret);
}
if (ret != ROK)
{
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
SPutMsg(mBuf);
return (ret);
}
}
/* cleanup */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
#else /* end of Win NT/flat buffer specific part */
/* allocate gather vector, it's a dynamic array */
numDBufs = CM_INET_MAX_DBUF;
- ret = SGetSBuf(info->region, info->pool, (Data**)&dBufs,
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data**)&dBufs,
numDBufs*sizeof(Buffer*));
if (ret != ROK)
{
for (i = 0; i < msg.msg_iovlen; i++)
SPutDBuf(info->region, info->pool, dBufs[i]);
- SPutSBuf(info->region, info->pool, (Data*)dBufs,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data*)dBufs,
numDBufs * sizeof(Buffer*));
/* allocate flat receive buffer */
- ret = SGetSBuf(info->region, info->pool, &recvBuf, bufLen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, &recvBuf, bufLen);
if (ret != ROK)
return (ROUTRES);
}
else
{
- SPutSBuf(info->region, info->pool, (Data*)dBufs,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data*)dBufs,
numDBufs*sizeof(Buffer*));
return (ret);
}
/* Moved up the cleanup precedures here before returning */
/* Cleanup flat buffer if allocated */
if (allocFlatBuf)
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
else
{
/* cleanup */
SPutDBuf(info->region, info->pool, dBufs[i]);
}
- SPutSBuf(info->region, info->pool, (Data*)dBufs,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data*)dBufs,
numDBufs*sizeof(Buffer*));
}
if (ret != ROK)
{
/* cleanup */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
return (ret);
}
ret = SAddPstMsgMult(recvBuf, recvLen, tempMsg);
if (ret != ROK)
{
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
SPutMsg(tempMsg);
return (ret);
}
*mPtr = tempMsg;
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
/* cm_inet_c_001.main_48 :flat buffers are allocated
* for non -TCP sockets. On these sockets we can receive
* only one message at a time
* mBuf */
if (*mPtr != NULLP)
SPutMsg(*mPtr);
- SPutSBuf(info->region, info->pool, (Data*)dBufs,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data*)dBufs,
numDBufs*sizeof(Buffer*));
return (ret);
}
/* cleanup */
SPutMsg(*mPtr);
SPutMsg(tempMsg);
- SPutSBuf(info->region, info->pool, (Data*)dBufs,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data*)dBufs,
numDBufs*sizeof(Buffer*));
return RFAILED;
}
SPutMsg(tempMsg);
}
- SPutSBuf(info->region, info->pool, (Data*)dBufs,
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, (Data*)dBufs,
numDBufs*sizeof(Buffer*));
/*
if ((MsgLen)pendLen >= bufLen)
{
/* allocate receive buffer (flat structure) */
- ret = SGetSBuf(info->region, info->pool, &recvBuf, bufLen);
+ ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, &recvBuf, bufLen);
if (ret != ROK)
{
return (ROUTRES);
{
/* cleanup */
/* moved cleanup here */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
/* added check ERR_WOULDBLOCK */
if ((INET_ERR_CODE == ERR_AGAIN) ||
if (recvLen < (S32)bufLen) /* maybe happen */
{
/* cleanup */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
return (ROKDNA);
}
}
/* cleanup */
- SPutSBuf(info->region, info->pool, recvBuf, bufLen);
+ SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,info->region, info->pool, recvBuf, bufLen);
}
else
{