提交 6dfc958c 编写于 作者: S slguan

[TBASE-1241]

上级 a3c0c50d
......@@ -109,8 +109,6 @@ int taosSetSecurityInfo(int cid, int sid, char *id, int spi, int encrypt, char *
void taosGetRpcConnInfo(void *thandle, uint32_t *peerId, uint32_t *peerIp, uint16_t *peerPort, int *cid, int *sid);
uint32_t taosGetRpcLocalIp(void *thandle);
int taosGetOutType(void *thandle);
#ifdef __cplusplus
......
......@@ -1411,11 +1411,6 @@ void taosGetRpcConnInfo(void *thandle, uint32_t *peerId, uint32_t *peerIp, uint1
*sid = pConn->sid;
}
uint32_t taosGetRpcLocalIp(void *thandle) {
SRpcConn *pConn = (SRpcConn *)thandle;
return pConn->peerIp;
}
int taosGetOutType(void *thandle) {
SRpcConn *pConn = (SRpcConn *)thandle;
if (pConn == NULL) return -1;
......
......@@ -1220,11 +1220,8 @@ int mgmtProcessConnectMsg(char *pMsg, int msgLen, SConnObj *pConn) {
pConn->pAcct = pAcct;
pConn->pDb = pDb;
pConn->pUser = pUser;
uint32_t peerIp = taosGetRpcLocalIp(pConn->thandle);
pConn->usePublicIp = (peerIp == tsPublicIpInt ? 1 : 0);
mgmtEstablishConn(pConn);
_rsp:
pStart = taosBuildRspMsgWithSize(pConn->thandle, TSDB_MSG_TYPE_CONNECT_RSP, 128);
if (pStart == NULL) return 0;
......@@ -1298,10 +1295,9 @@ void *mgmtProcessMsgFromShell(char *msg, void *ahandle, void *thandle) {
pConn = connList + pMsg->destId;
pConn->thandle = thandle;
strcpy(pConn->user, pMsg->meterId);
pConn->usePublicIp = (pMsg->destIp == tsPublicIpInt ? 1 : 0);
mPrint("pConn:%p is rebuild, destIp:%s publicIp:%s usePublicIp:%u",
pConn, taosIpStr(pMsg->destIp), taosIpStr(tsPublicIpInt), pConn->usePublicIp);
mTrace("pConn:%p is rebuild, destIp:%s publicIp:%s usePublicIp:%u",
pConn, taosIpStr(pMsg->destIp), taosIpStr(tsPublicIpInt), pConn->usePublicIp);
}
if (pMsg->msgType == TSDB_MSG_TYPE_CONNECT) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册