From 3a8bf9ad75215b3771928803ac41d531cae23fe3 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 26 Aug 2021 13:54:34 +0800 Subject: [PATCH] [TD-5992] add error msg --- src/client/src/tscSystem.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 626baa15a0..2d36a4bef4 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -442,13 +442,11 @@ int taos_options(TSDB_OPTION option, const void *arg, ...) { static int taos_set_config_imp(const char *config){ static bool setConfFlag = false; if (setConfFlag) { - printf("already set config"); return 0; } taosInitGlobalCfg(); cJSON *root = cJSON_Parse(config); if (root == NULL) { - printf("failed to set config, invalid json format: %s", config); return -1; } @@ -456,13 +454,7 @@ static int taos_set_config_imp(const char *config){ int size = cJSON_GetArraySize(root); for(int i = 0; i < size; i++){ cJSON *item = cJSON_GetArrayItem(root, i); - if (!item) { - printf("failed to read index:%d", i); - ret = -2; - continue; - } - if(!taosReadConfigOption(item->string, item->valuestring, NULL, NULL, TAOS_CFG_CSTATUS_OPTION)){ - printf("set failed:%s->%s, paras err or can not set from file", item->string, item->valuestring); + if(item && !taosReadConfigOption(item->string, item->valuestring, NULL, NULL, TAOS_CFG_CSTATUS_OPTION)){ ret = -2; } } -- GitLab