[fix bug]

This commit is contained in:
Hui Li 2020-07-30 14:49:18 +08:00
parent 92cd048474
commit 3cc384a03c
2 changed files with 4 additions and 2 deletions

View File

@ -297,7 +297,7 @@ static void doInitGlobalConfig() {
SGlobalCfg cfg = {0};
// ip address
cfg.option = "first";
cfg.option = "firstEp";
cfg.ptr = tsFirst;
cfg.valType = TAOS_CFG_VTYPE_STRING;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT;
@ -307,7 +307,7 @@ static void doInitGlobalConfig() {
cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg);
cfg.option = "second";
cfg.option = "secondEp";
cfg.ptr = tsSecond;
cfg.valType = TAOS_CFG_VTYPE_STRING;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT;

View File

@ -73,6 +73,8 @@ TAOS *shellInit(SShellArguments *args) {
// Connect to the database.
TAOS *con = taos_connect(args->host, args->user, args->password, args->database, args->port);
if (con == NULL) {
printf("taos connect failed, reason: %s.\n\n", tstrerror(terrno));
fflush(stdout);
return con;
}