Merge pull request #1865 from taosdata/hotfix/mnodeIpList
port shall be htons
This commit is contained in:
commit
cf4c526411
|
@ -88,10 +88,12 @@ void mgmtProcessReqMsgFromDnode(SRpcMsg *rpcMsg) {
|
|||
|
||||
SRpcIpSet ipSet = {0};
|
||||
dnodeGetMnodeDnodeIpSet(&ipSet);
|
||||
for (int i = 0; i < ipSet.numOfIps; ++i)
|
||||
ipSet.port[i] = htons(ipSet.port[i]);
|
||||
|
||||
mTrace("conn from dnode ip:%s user:%s redirect msg, inUse:%d", taosIpStr(connInfo.clientIp), connInfo.user, ipSet.inUse);
|
||||
for (int32_t i = 0; i < ipSet.numOfIps; ++i) {
|
||||
mTrace("index:%d %s:%d", i, ipSet.fqdn[i], ipSet.port[i]);
|
||||
mTrace("mnode index:%d %s:%d", i, ipSet.fqdn[i], htons(ipSet.port[i]));
|
||||
}
|
||||
rpcSendRedirectRsp(rpcMsg->handle, &ipSet);
|
||||
return;
|
||||
|
|
|
@ -137,7 +137,7 @@ void mgmtProcessMsgFromShell(SRpcMsg *rpcMsg) {
|
|||
mgmtGetMnodeIpSet(&ipSet);
|
||||
mTrace("conn from shell ip:%s user:%s redirect msg, inUse:%d", taosIpStr(connInfo.clientIp), connInfo.user, ipSet.inUse);
|
||||
for (int32_t i = 0; i < ipSet.numOfIps; ++i) {
|
||||
mTrace("index:%d ip:%s:%d", i, ipSet.fqdn[i], ipSet.port[i]);
|
||||
mTrace("mnode index:%d ip:%s:%d", i, ipSet.fqdn[i], htons(ipSet.port[i]));
|
||||
}
|
||||
|
||||
rpcSendRedirectRsp(rpcMsg->handle, &ipSet);
|
||||
|
|
|
@ -1094,8 +1094,8 @@ static void rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) {
|
|||
} else {
|
||||
if (pHead->code == 0) pConn->secured = 1; // for success response, set link as secured
|
||||
if (pHead->msgType < TSDB_MSG_TYPE_CM_HEARTBEAT || (rpcDebugFlag & 16))
|
||||
tTrace( "%s %p, %s is sent to %s:%hu, code:0x%x len:%d sig:0x%08x:0x%08x:%d",
|
||||
pRpc->label, pConn, taosMsg[pHead->msgType], pConn->peerFqdn, pConn->peerPort,
|
||||
tTrace( "%s %p, %s is sent to 0x%x:%hu, code:0x%x len:%d sig:0x%08x:0x%08x:%d",
|
||||
pRpc->label, pConn, taosMsg[pHead->msgType], pConn->peerIp, pConn->peerPort,
|
||||
htonl(pHead->code), msgLen, pHead->sourceId, pHead->destId, pHead->tranId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue