Merge remote-tracking branch 'origin/3.0' into enh/opt-transport
This commit is contained in:
parent
108139ffad
commit
2947aaf89a
|
@ -951,14 +951,7 @@ int32_t transCreateReqEpsetFromUserEpset(const SEpSet* pEpset, SReqEpSet** pReqE
|
||||||
if (pReq == NULL) {
|
if (pReq == NULL) {
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
memcpy((char*)pReqEpSet, (char*)pEpset, size);
|
||||||
pReq->inUse = pEpset->inUse;
|
|
||||||
pReq->numOfEps = pEpset->numOfEps;
|
|
||||||
for (int32_t i = 0; i < pEpset->numOfEps; i++) {
|
|
||||||
pReq->eps[i].port = pEpset->eps[i].port;
|
|
||||||
strcpy(pReq->eps[i].fqdn, pEpset->eps[i].fqdn);
|
|
||||||
}
|
|
||||||
|
|
||||||
*pReqEpSet = pReq;
|
*pReqEpSet = pReq;
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -967,13 +960,6 @@ int32_t transCreateUserEpsetFromReqEpset(const SReqEpSet* pReqEpSet, SEpSet* pEp
|
||||||
if (pReqEpSet == NULL) {
|
if (pReqEpSet == NULL) {
|
||||||
return TSDB_CODE_INVALID_PARA;
|
return TSDB_CODE_INVALID_PARA;
|
||||||
}
|
}
|
||||||
|
memcpy((char*)pEpSet, (char*)pReqEpSet, sizeof(SReqEpSet) + sizeof(SEp) * pReqEpSet->numOfEps);
|
||||||
pEpSet->inUse = pReqEpSet->inUse;
|
|
||||||
pEpSet->numOfEps = pReqEpSet->numOfEps;
|
|
||||||
for (int32_t i = 0; i < pReqEpSet->numOfEps; i++) {
|
|
||||||
pEpSet->eps[i].port = pReqEpSet->eps[i].port;
|
|
||||||
strcpy(pEpSet->eps[i].fqdn, pReqEpSet->eps[i].fqdn);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
Loading…
Reference in New Issue