chore: more code

This commit is contained in:
kailixu 2023-05-09 19:02:09 +08:00
parent e4882765ae
commit 665681947f
2 changed files with 11 additions and 1 deletions

View File

@ -48,6 +48,16 @@ typedef enum {
TSDB_GRANT_TABLE,
} EGrantType;
#define GRANT_ACTIVE_ON ((int8_t)0x01)
#define GRANT_CONN_ACTIVE_ON ((int8_t)0x02)
#define SET_GRANT_ACTIVE_ON(f) ((f) |= GRANT_ACTIVE_ON)
#define SET_GRANT_CONN_ACTIVE_ON(f) ((f) |= GRANT_CONN_ACTIVE_ON)
#define IS_GRANT_ACTIVE_CODES_ON(f) ((f) != 0x0)
#define IS_GRANT_ACTIVE_ON(f) (((f)&0x01) == GRANT_ACTIVE_ON)
#define IS_GRANT_CONN_ACTIVE_ON(f) (((f)&0x02) == GRANT_CONN_ACTIVE_ON)
int32_t grantCheck(EGrantType grant);
#ifndef GRANTS_CFG

View File

@ -268,7 +268,7 @@ typedef enum ELogicConditionType {
#define TSDB_DNODE_VALUE_LEN 256
#define TSDB_ACTIVE_KEY_LEN 109
#define TSDB_CONN_ACTIVE_KEY_LEN 257
#define TSDB_CONN_ACTIVE_KEY_LEN 109
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE