chore: more code
This commit is contained in:
parent
3ab2ad20b4
commit
0e6b982682
|
@ -34,6 +34,7 @@ extern char tsFirst[];
|
|||
extern char tsSecond[];
|
||||
extern char tsLocalFqdn[];
|
||||
extern char tsLocalEp[];
|
||||
extern char tsVersionName[];
|
||||
extern uint16_t tsServerPort;
|
||||
extern int32_t tsVersion;
|
||||
extern int32_t tsStatusInterval;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
aux_source_directory(src COMMON_SRC)
|
||||
IF (TD_ENTERPRISE)
|
||||
LIST(APPEND COMMON_SRC ${TD_ENTERPRISE_DIR}/src/plugins/common/src/tglobal.c)
|
||||
ENDIF()
|
||||
|
||||
add_library(common STATIC ${COMMON_SRC})
|
||||
|
||||
if (DEFINED GRANT_CFG_INCLUDE_DIR)
|
||||
|
|
|
@ -34,6 +34,7 @@ char tsFirst[TSDB_EP_LEN] = {0};
|
|||
char tsSecond[TSDB_EP_LEN] = {0};
|
||||
char tsLocalFqdn[TSDB_FQDN_LEN] = {0};
|
||||
char tsLocalEp[TSDB_EP_LEN] = {0}; // Local End Point, hostname:port
|
||||
char tsVersionName[16] = "community";
|
||||
uint16_t tsServerPort = 6030;
|
||||
int32_t tsVersion = 30000000;
|
||||
int32_t tsStatusInterval = 1; // second
|
||||
|
@ -938,6 +939,12 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef TD_ENTERPRISE
|
||||
static int32_t taosSetReleaseCfg(SConfig *pCfg) { return 0; }
|
||||
#else
|
||||
int32_t taosSetReleaseCfg(SConfig *pCfg);
|
||||
#endif
|
||||
|
||||
void taosLocalCfgForbiddenToChange(char *name, bool *forbidden) {
|
||||
int32_t len = strlen(name);
|
||||
char lowcaseName[CFG_NAME_MAX_LEN + 1] = {0};
|
||||
|
@ -1444,6 +1451,7 @@ int32_t taosInitCfg(const char *cfgDir, const char **envCmd, const char *envFile
|
|||
if (taosSetClientCfg(tsCfg)) return -1;
|
||||
if (taosUpdateServerCfg(tsCfg)) return -1;
|
||||
if (taosSetServerCfg(tsCfg)) return -1;
|
||||
if (taosSetReleaseCfg(tsCfg)) return -1;
|
||||
if (taosSetTfsCfg(tsCfg) != 0) return -1;
|
||||
}
|
||||
taosSetSystemCfg(tsCfg);
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
goto _exit; \
|
||||
} while (0)
|
||||
|
||||
extern char tsVersionName[16];
|
||||
static SDnode globalDnode = {0};
|
||||
static const char *dmOS[10] = {"Ubuntu", "CentOS Linux", "Red Hat", "Debian GNU", "CoreOS",
|
||||
"FreeBSD", "openSUSE", "SLES", "Fedora", "MacOS"};
|
||||
|
@ -72,7 +71,6 @@ static int32_t dmInitMonitor() {
|
|||
|
||||
DM_INIT_MON();
|
||||
|
||||
dInfo("%s:%d stName is %s", __func__, __LINE__, stName);
|
||||
if (STR_STR_CMP(stName, STR_STR_SIGN)) {
|
||||
DM_ERR_RTN(0);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#define CLUSTER_VER_NUMBE 1
|
||||
#define CLUSTER_RESERVE_SIZE 60
|
||||
char tsVersionName[16] = "community";
|
||||
int64_t tsExpireTime = 0;
|
||||
|
||||
static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster);
|
||||
|
|
Loading…
Reference in New Issue