refCount data type shall be int32_t
This commit is contained in:
parent
ac9ca4ff44
commit
fc195ce1d0
|
@ -58,7 +58,7 @@ typedef struct {
|
||||||
void (*cfp)(SRpcMsg *, SRpcIpSet *);
|
void (*cfp)(SRpcMsg *, SRpcIpSet *);
|
||||||
int (*afp)(char *user, char *spi, char *encrypt, char *secret, char *ckey);
|
int (*afp)(char *user, char *spi, char *encrypt, char *secret, char *ckey);
|
||||||
|
|
||||||
int refCount;
|
int32_t refCount;
|
||||||
void *idPool; // handle to ID pool
|
void *idPool; // handle to ID pool
|
||||||
void *tmrCtrl; // handle to timer
|
void *tmrCtrl; // handle to timer
|
||||||
SHashObj *hash; // handle returned by hash utility
|
SHashObj *hash; // handle returned by hash utility
|
||||||
|
@ -1480,12 +1480,12 @@ static void rpcUnlockConn(SRpcConn *pConn) {
|
||||||
|
|
||||||
static void rpcAddRef(SRpcInfo *pRpc)
|
static void rpcAddRef(SRpcInfo *pRpc)
|
||||||
{
|
{
|
||||||
atomic_add_fetch_8(&pRpc->refCount, 1);
|
atomic_add_fetch_32(&pRpc->refCount, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rpcDecRef(SRpcInfo *pRpc)
|
static void rpcDecRef(SRpcInfo *pRpc)
|
||||||
{
|
{
|
||||||
if (atomic_sub_fetch_8(&pRpc->refCount, 1) == 0) {
|
if (atomic_sub_fetch_32(&pRpc->refCount, 1) == 0) {
|
||||||
taosHashCleanup(pRpc->hash);
|
taosHashCleanup(pRpc->hash);
|
||||||
taosTmrCleanUp(pRpc->tmrCtrl);
|
taosTmrCleanUp(pRpc->tmrCtrl);
|
||||||
taosIdPoolCleanUp(pRpc->idPool);
|
taosIdPoolCleanUp(pRpc->idPool);
|
||||||
|
|
Loading…
Reference in New Issue