add user req

This commit is contained in:
yihaoDeng 2024-09-29 15:09:30 +08:00
parent f40f417bd2
commit b15506c1de
1 changed files with 2 additions and 1 deletions

View File

@ -1568,7 +1568,7 @@ static void cliHandleUpdate(SCliThrd* pThrd, SCliReq* pReq) {
}
FORCE_INLINE int32_t cliMayCvtFqdnToIp(SReqEpSet* pEpSet, const SCvtAddr* pCvtAddr) {
if (pCvtAddr == NULL) {
if (pEpSet == NULL || pCvtAddr == NULL) {
return 0;
}
if (pCvtAddr->cvt == false) {
@ -1578,6 +1578,7 @@ FORCE_INLINE int32_t cliMayCvtFqdnToIp(SReqEpSet* pEpSet, const SCvtAddr* pCvtAd
return TSDB_CODE_RPC_FQDN_ERROR;
}
}
if (pEpSet->numOfEps == 1 && strncmp(pEpSet->eps[0].fqdn, pCvtAddr->fqdn, TSDB_FQDN_LEN) == 0) {
memset(pEpSet->eps[0].fqdn, 0, TSDB_FQDN_LEN);
memcpy(pEpSet->eps[0].fqdn, pCvtAddr->ip, TSDB_FQDN_LEN);