fix return error

This commit is contained in:
yihaoDeng 2024-08-06 16:52:28 +08:00
parent 2d57e77df8
commit 66753111c9
6 changed files with 9 additions and 8 deletions

View File

@ -375,7 +375,7 @@ int32_t openTransporter(const char *user, const char *auth, int32_t numOfThread,
*pDnodeConn = rpcOpen(&rpcInit);
if (*pDnodeConn == NULL) {
tscError("failed to init connection to server.");
code = TSDB_CODE_FAILED;
code = terrno;
}
return code;

View File

@ -2467,6 +2467,7 @@ TSDB_SERVER_STATUS taos_check_server_status(const char* fqdn, int port, char* de
clientRpc = rpcOpen(&rpcInit);
if (clientRpc == NULL) {
code = terrno;
tscError("failed to init server status client");
goto _OVER;
}

View File

@ -393,7 +393,7 @@ int32_t dmInitClient(SDnode *pDnode) {
pTrans->clientRpc = rpcOpen(&rpcInit);
if (pTrans->clientRpc == NULL) {
dError("failed to init dnode rpc client");
return -1;
return terrno;
}
dDebug("dnode rpc client is initialized");
@ -437,7 +437,7 @@ int32_t dmInitStatusClient(SDnode *pDnode) {
pTrans->statusRpc = rpcOpen(&rpcInit);
if (pTrans->statusRpc == NULL) {
dError("failed to init dnode rpc status client");
return TSDB_CODE_OUT_OF_MEMORY;
return terrno;
}
dDebug("dnode rpc status client is initialized");
@ -482,7 +482,7 @@ int32_t dmInitSyncClient(SDnode *pDnode) {
pTrans->syncRpc = rpcOpen(&rpcInit);
if (pTrans->syncRpc == NULL) {
dError("failed to init dnode rpc sync client");
return TSDB_CODE_OUT_OF_MEMORY;
return terrno;
}
dDebug("dnode rpc sync client is initialized");

View File

@ -1173,7 +1173,7 @@ int32_t udfdOpenClientRpc() {
global.clientRpc = rpcOpen(&rpcInit);
if (global.clientRpc == NULL) {
fnError("failed to init dnode rpc client");
return -1;
return terrno;
}
return 0;
}

View File

@ -193,7 +193,7 @@ static int32_t syncIOStartInternal(SSyncIO *io) {
io->clientRpc = rpcOpen(&rpcInit);
if (io->clientRpc == NULL) {
sError("failed to initialize RPC");
return -1;
return terrno;
}
}
@ -214,7 +214,7 @@ static int32_t syncIOStartInternal(SSyncIO *io) {
void *pRpc = rpcOpen(&rpcInit);
if (pRpc == NULL) {
sError("failed to start RPC server");
return -1;
return terrno;
}
}

View File

@ -160,7 +160,7 @@ int main(int argc, char *argv[]) {
void *pRpc = rpcOpen(&rpcInit);
if (pRpc == NULL) {
tError("failed to initialize RPC");
return -1;
return terrno;
}
tInfo("client is initialized");