fix taos_options crash

This commit is contained in:
slguan 2020-04-20 09:35:55 +08:00
parent 8fe6f45a7b
commit 584ccc43c3
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ static void taosReadLogOption(char *option, char *value) {
} }
SGlobalCfg *taosGetConfigOption(const char *option) { SGlobalCfg *taosGetConfigOption(const char *option) {
taosInitGlobalCfg();
for (int i = 0; i < tsGlobalConfigNum; ++i) { for (int i = 0; i < tsGlobalConfigNum; ++i) {
SGlobalCfg *cfg = tsGlobalConfig + i; SGlobalCfg *cfg = tsGlobalConfig + i;
if (strcasecmp(cfg->option, option) != 0) continue; if (strcasecmp(cfg->option, option) != 0) continue;