diff --git a/src/inc/trpc.h b/src/inc/trpc.h index 940a1bf044d1034812c606a4138b6ff722b01561..9176a8b0683c83d3e3227f7ae37d00a22a7ea795 100644 --- a/src/inc/trpc.h +++ b/src/inc/trpc.h @@ -82,7 +82,7 @@ typedef struct SSendInfo { void *pContext; void *pConn; void *pFdObj; - int32_t fd; + SOCKET fd; } SSendInfo; int32_t rpcInit(); diff --git a/src/rpc/inc/rpcTcp.h b/src/rpc/inc/rpcTcp.h index 20ebec4feca7f7f904fda0423aa79acb0e49e8ab..a47fa39ceb3b3a642c7839902885cbc8728abe16 100644 --- a/src/rpc/inc/rpcTcp.h +++ b/src/rpc/inc/rpcTcp.h @@ -32,7 +32,7 @@ void *taosOpenTcpClientConnection(void *shandle, void *thandle, uint32_t ip, uin void taosCloseTcpConnection(void *chandle); int taosSendTcpData(uint32_t ip, uint16_t port, void *data, int len, void *chandle); -int32_t taosGetFdID(void *chandle); +SOCKET taosGetFdID(void *chandle); #ifdef __cplusplus } diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 9360e7afd940054c1d1fd3f64143c80c012eeb8d..e350f9e5fe3afd5ecfc48e8e2051d238c1673f5d 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -86,8 +86,8 @@ typedef struct { SRpcMsg *pRsp; // for synchronous API tsem_t *pSem; // for synchronous API SRpcEpSet *pSet; // for synchronous API - char msg[0]; // RpcHead starts from here SSendInfo sendInfo; // save last send information + char msg[0]; // RpcHead starts from here } SRpcReqContext; typedef struct SRpcConn { @@ -1840,7 +1840,7 @@ bool rpcSendProbe(int64_t rpcRid, void* pPrevContext) { } // fd same - int32_t fd = taosGetFdID(pContext->pConn->chandle); + SOCKET fd = taosGetFdID(pContext->pConn->chandle); if (fd != pContext->sendInfo.fd) { tInfo("PROBE rpcRid=0x%" PRIx64 " connect fd diff.fd=%d prevFd=%d", rpcRid, fd, pContext->sendInfo.fd); goto _END; diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index aa13179af1b11487e96a4a6873a0c26774fc950a..530a279cc72a291525356aa1f2a6495f605946a0 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -675,7 +675,7 @@ static void taosFreeFdObj(SFdObj *pFdObj) { tfree(pFdObj); } -int32_t taosGetFdID(void *chandle) { +SOCKET taosGetFdID(void *chandle) { SFdObj * pFdObj = chandle; if(pFdObj == NULL) return -1;