diff --git a/src/mnode/src/mgmtTable.c b/src/mnode/src/mgmtTable.c index 83b9d6c8a1a283121e6c2d247fd8ec70cfad8f17..159c97b8b0855bd93af3c0aaf9660da1ebd9e709 100644 --- a/src/mnode/src/mgmtTable.c +++ b/src/mnode/src/mgmtTable.c @@ -1637,7 +1637,7 @@ static int32_t mgmtDoGetChildTableMeta(SQueuedMsg *pMsg, STableMetaMsg *pMeta) { SDnodeObj *pDnode = mgmtGetDnode(pVgroup->vnodeGid[i].dnodeId); if (pDnode == NULL) break; strcpy(pMeta->vgroup.ipAddr[i].fqdn, pDnode->dnodeFqdn); - pMeta->vgroup.ipAddr[i].port = htonl(pDnode->dnodePort + TSDB_PORT_DNODESHELL); + pMeta->vgroup.ipAddr[i].port = htons(pDnode->dnodePort + TSDB_PORT_DNODESHELL); pMeta->vgroup.numOfIps++; mgmtDecDnodeRef(pDnode); } diff --git a/src/mnode/src/mgmtVgroup.c b/src/mnode/src/mgmtVgroup.c index 9b3e88196b7b51782761c07750e60d62ad3a29d9..792c6e1fb73028814bd963b16dbc07119df4a4fa 100644 --- a/src/mnode/src/mgmtVgroup.c +++ b/src/mnode/src/mgmtVgroup.c @@ -572,7 +572,7 @@ SRpcIpSet mgmtGetIpSetFromVgroup(SVgObj *pVgroup) { }; for (int i = 0; i < pVgroup->numOfVnodes; ++i) { strcpy(ipSet.fqdn[i], pVgroup->vnodeGid[i].pDnode->dnodeFqdn); - ipSet.port[i] = pVgroup->vnodeGid[i].pDnode->dnodePort + TSDB_PORT_DNODESHELL; + ipSet.port[i] = pVgroup->vnodeGid[i].pDnode->dnodePort + TSDB_PORT_DNODEMNODE; } return ipSet; }