opt status send

This commit is contained in:
yihaoDeng 2023-10-18 16:37:34 +08:00
parent e62f3fa86a
commit ef27c87756
3 changed files with 4 additions and 3 deletions

View File

@ -249,7 +249,7 @@ typedef enum ELogicConditionType {
#define TSDB_PASSWORD_LEN 32 #define TSDB_PASSWORD_LEN 32
#define TSDB_USET_PASSWORD_LEN 129 #define TSDB_USET_PASSWORD_LEN 129
#define TSDB_VERSION_LEN 32 #define TSDB_VERSION_LEN 32
#define TSDB_LABEL_LEN 8 #define TSDB_LABEL_LEN 12
#define TSDB_JOB_STATUS_LEN 32 #define TSDB_JOB_STATUS_LEN 32
#define TSDB_CLUSTER_ID_LEN 40 #define TSDB_CLUSTER_ID_LEN 40

View File

@ -362,7 +362,7 @@ int32_t dmInitStatusClient(SDnode *pDnode) {
SDnodeTrans *pTrans = &pDnode->trans; SDnodeTrans *pTrans = &pDnode->trans;
SRpcInit rpcInit = {0}; SRpcInit rpcInit = {0};
rpcInit.label = "DND-STATUS-C"; rpcInit.label = "DND-STATUS";
rpcInit.numOfThreads = 1; rpcInit.numOfThreads = 1;
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg; rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
rpcInit.sessions = 1024; rpcInit.sessions = 1024;

View File

@ -41,7 +41,8 @@ void* rpcOpen(const SRpcInit* pInit) {
return NULL; return NULL;
} }
if (pInit->label) { if (pInit->label) {
tstrncpy(pRpc->label, pInit->label, sizeof(pRpc->label)); int len = strlen(pInit->label) > sizeof(pRpc->label) ? sizeof(pRpc->label) : strlen(pInit->label);
tstrncpy(pRpc->label, pInit->label, len);
} }
pRpc->compressSize = pInit->compressSize; pRpc->compressSize = pInit->compressSize;