feat: support uniq grant
This commit is contained in:
parent
2309e577c6
commit
fe01fb635d
|
@ -22,9 +22,7 @@ extern "C" {
|
|||
|
||||
#include "os.h"
|
||||
#include "taoserror.h"
|
||||
#ifdef GRANTS_CFG
|
||||
#include "tgrantCfg.h"
|
||||
#endif
|
||||
#include "tdef.h"
|
||||
|
||||
#ifndef GRANTS_COL_MAX_LEN
|
||||
#define GRANTS_COL_MAX_LEN 196
|
||||
|
|
|
@ -419,8 +419,9 @@ int32_t dmProcessGetMachine(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
|||
return -1;
|
||||
}
|
||||
char *machineId = grantGetMachineId();
|
||||
if (machineId && (strlen(machineId) == TSDB_MACHINE_ID_LEN)) {
|
||||
if (machineId) {
|
||||
memcpy(pRsp, machineId, TSDB_MACHINE_ID_LEN);
|
||||
taosMemoryFreeClear(machineId);
|
||||
} else {
|
||||
terrno = TSDB_CODE_INVALID_DATA_FMT;
|
||||
rpcFreeCont(pRsp);
|
||||
|
|
Loading…
Reference in New Issue