commit
f4683a4d15
|
@ -140,11 +140,7 @@ void* rpcMallocCont(int64_t contLen) {
|
||||||
return start + sizeof(STransMsgHead);
|
return start + sizeof(STransMsgHead);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rpcFreeCont(void* cont) {
|
void rpcFreeCont(void* cont) { transFreeMsg(cont); }
|
||||||
if (cont == NULL) return;
|
|
||||||
taosMemoryFree((char*)cont - TRANS_MSG_OVERHEAD);
|
|
||||||
tTrace("rpc free cont:%p", (char*)cont - TRANS_MSG_OVERHEAD);
|
|
||||||
}
|
|
||||||
|
|
||||||
void* rpcReallocCont(void* ptr, int64_t contLen) {
|
void* rpcReallocCont(void* ptr, int64_t contLen) {
|
||||||
if (ptr == NULL) return rpcMallocCont(contLen);
|
if (ptr == NULL) return rpcMallocCont(contLen);
|
||||||
|
|
|
@ -218,7 +218,6 @@ static void (*cliAsyncHandle[])(SCliMsg* pMsg, SCliThrd* pThrd) = {cliHandleReq,
|
||||||
/// static void (*cliAsyncHandle[])(SCliMsg* pMsg, SCliThrd* pThrd) = {cliHandleReq, cliHandleQuit, cliHandleRelease,
|
/// static void (*cliAsyncHandle[])(SCliMsg* pMsg, SCliThrd* pThrd) = {cliHandleReq, cliHandleQuit, cliHandleRelease,
|
||||||
/// NULL,cliHandleUpdate};
|
/// NULL,cliHandleUpdate};
|
||||||
|
|
||||||
static FORCE_INLINE void destroyUserdata(STransMsg* userdata);
|
|
||||||
static FORCE_INLINE void destroyCmsg(void* cmsg);
|
static FORCE_INLINE void destroyCmsg(void* cmsg);
|
||||||
static FORCE_INLINE void destroyCmsgAndAhandle(void* cmsg);
|
static FORCE_INLINE void destroyCmsgAndAhandle(void* cmsg);
|
||||||
static FORCE_INLINE int cliRBChoseIdx(STrans* pTransInst);
|
static FORCE_INLINE int cliRBChoseIdx(STrans* pTransInst);
|
||||||
|
@ -1950,14 +1949,6 @@ _err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FORCE_INLINE void destroyUserdata(STransMsg* userdata) {
|
|
||||||
if (userdata->pCont == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
transFreeMsg(userdata->pCont);
|
|
||||||
userdata->pCont = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE void destroyCmsg(void* arg) {
|
static FORCE_INLINE void destroyCmsg(void* arg) {
|
||||||
SCliMsg* pMsg = arg;
|
SCliMsg* pMsg = arg;
|
||||||
if (pMsg == NULL) {
|
if (pMsg == NULL) {
|
||||||
|
@ -1965,7 +1956,7 @@ static FORCE_INLINE void destroyCmsg(void* arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
transDestroyConnCtx(pMsg->ctx);
|
transDestroyConnCtx(pMsg->ctx);
|
||||||
destroyUserdata(&pMsg->msg);
|
transFreeMsg(pMsg->msg.pCont);
|
||||||
taosMemoryFree(pMsg);
|
taosMemoryFree(pMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1984,7 +1975,7 @@ static FORCE_INLINE void destroyCmsgAndAhandle(void* param) {
|
||||||
tDebug("destroy Ahandle C");
|
tDebug("destroy Ahandle C");
|
||||||
|
|
||||||
transDestroyConnCtx(pMsg->ctx);
|
transDestroyConnCtx(pMsg->ctx);
|
||||||
destroyUserdata(&pMsg->msg);
|
transFreeMsg(pMsg->msg.pCont);
|
||||||
taosMemoryFree(pMsg);
|
taosMemoryFree(pMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ void transFreeMsg(void* msg) {
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
tTrace("rpc free cont:%p", (char*)msg - TRANS_MSG_OVERHEAD);
|
||||||
taosMemoryFree((char*)msg - sizeof(STransMsgHead));
|
taosMemoryFree((char*)msg - sizeof(STransMsgHead));
|
||||||
}
|
}
|
||||||
int transSockInfo2Str(struct sockaddr* sockname, char* dst) {
|
int transSockInfo2Str(struct sockaddr* sockname, char* dst) {
|
||||||
|
|
Loading…
Reference in New Issue