opt parameter
This commit is contained in:
parent
2c60ee27cc
commit
a3c80a2a70
|
@ -443,11 +443,12 @@ static int32_t uvMayHandleReleaseReq(SSvrConn* pConn, STransMsgHead* pHead) {
|
||||||
(void)taosHashRemove(pConn->pQTable, &qId, sizeof(qId));
|
(void)taosHashRemove(pConn->pQTable, &qId, sizeof(qId));
|
||||||
}
|
}
|
||||||
|
|
||||||
STransMsg tmsg = {.code = code,
|
STransMsg tmsg = {.code = code,
|
||||||
.msgType = pHead->msgType + 1,
|
.msgType = pHead->msgType + 1,
|
||||||
.info.qId = qId,
|
.info.qId = qId,
|
||||||
.info.traceId = pHead->traceId,
|
.info.traceId = pHead->traceId,
|
||||||
.info.seqNum = htonl(pHead->seqNum)};
|
.info.seqNum = htonl(pHead->seqNum)};
|
||||||
|
|
||||||
SSvrRespMsg* srvMsg = taosMemoryCalloc(1, sizeof(SSvrRespMsg));
|
SSvrRespMsg* srvMsg = taosMemoryCalloc(1, sizeof(SSvrRespMsg));
|
||||||
srvMsg->msg = tmsg;
|
srvMsg->msg = tmsg;
|
||||||
srvMsg->type = Normal;
|
srvMsg->type = Normal;
|
||||||
|
@ -456,6 +457,7 @@ static int32_t uvMayHandleReleaseReq(SSvrConn* pConn, STransMsgHead* pHead) {
|
||||||
transQueuePush(&pConn->resps, &srvMsg->q);
|
transQueuePush(&pConn->resps, &srvMsg->q);
|
||||||
|
|
||||||
uvStartSendRespImpl(srvMsg);
|
uvStartSendRespImpl(srvMsg);
|
||||||
|
taosMemoryFree(pHead);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -507,6 +509,7 @@ static bool uvHandleReq(SSvrConn* pConn) {
|
||||||
|
|
||||||
if (transDecompressMsg((char**)&pHead, msgLen) < 0) {
|
if (transDecompressMsg((char**)&pHead, msgLen) < 0) {
|
||||||
tError("%s conn %p recv invalid packet, failed to decompress", transLabel(pInst), pConn);
|
tError("%s conn %p recv invalid packet, failed to decompress", transLabel(pInst), pConn);
|
||||||
|
taosMemoryFree(pHead);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pHead->code = htonl(pHead->code);
|
pHead->code = htonl(pHead->code);
|
||||||
|
|
Loading…
Reference in New Issue