diff --git a/include/common/tgrant.h b/include/common/tgrant.h index ffa5112c24..314f295dcd 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -58,6 +58,9 @@ typedef enum { int32_t grantCheck(EGrantType grant); char* tGetMachineId(); +#ifndef TD_UNIQ_GRANT +int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type); +#endif #ifndef GRANTS_CFG #ifdef TD_ENTERPRISE diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h index a85d1f744c..82b3260860 100644 --- a/source/dnode/mnode/impl/inc/mndGrant.h +++ b/source/dnode/mnode/impl/inc/mndGrant.h @@ -23,7 +23,7 @@ #include "mndInt.h" int32_t mndInitGrant(SMnode * pMnode); - void mndCleanupGrant(SMnode * pMnode); + void mndCleanupGrant(); void grantParseParameter(); void grantReset(SMnode * pMnode, EGrantType grant, uint64_t value); void grantAdd(EGrantType grant, uint64_t value); @@ -36,8 +36,10 @@ int32_t mndGrantActionDelete(SSdb * pSdb, SGrantLogObj * pGrant); int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantLogObj * pOldGrant, SGrantLogObj * pNewGrant); +#ifdef TD_UNIQ_GRANT int32_t grantAlterActiveCode(SMnode * pMnode, SGrantLogObj * pObj, const char *oldActive, const char *newActive, char **mergeActive); +#endif int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg); int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState); diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 07a3618b8c..5e6ab09c9b 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -70,7 +70,7 @@ int32_t mndInitGrant(SMnode *pMnode) { return 0; } -void mndCleanupGrant(SMnode *pMnode) {} +void mndCleanupGrant() {} void grantParseParameter() { mError("can't parsed parameter k"); } void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {} void grantAdd(EGrantType grant, uint64_t value) {}