diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index d2dcf041fb3164c52eff05a5a599d3bc4025c5af..944b85e996db3364181d9a2ce4132e827cc3f406 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -47,7 +47,7 @@ int32_t tscNumOfObj = 0; // number of sqlObj in current process. static void *tscCheckDiskUsageTmr; void *tscRpcCache; // cache to keep rpc obj int32_t tscNumOfThreads = 1; // num of rpc threads -char tscLogFileName[12] = "taoslog"; +char tscLogFileName[] = "taoslog"; int tscLogFileNum = 10; static pthread_mutex_t rpcObjMutex; // mutex to protect open the rpc obj concurrently diff --git a/src/kit/shell/src/shellWindows.c b/src/kit/shell/src/shellWindows.c index 9aab9f49cd1be5051f28e3c69887bd8766e8af75..0133caf997f60a17748a536371479c11b354888d 100644 --- a/src/kit/shell/src/shellWindows.c +++ b/src/kit/shell/src/shellWindows.c @@ -250,14 +250,15 @@ void shellParseArgument(int argc, char *argv[], SShellArguments *arguments) { if (args.cloudDsn == NULL) { if (args.cloud) { args.cloudDsn = getenv("TDENGINE_CLOUD_DSN"); - if (args.cloudDsn[strlen(args.cloudDsn) - 1] == '\"') { - args.cloudDsn[strlen(args.cloudDsn) - 1] = '\0'; - } - if (args.cloudDsn[0] == '\"') { - args.cloudDsn += 1; - } if (args.cloudDsn == NULL) { args.cloud = false; + } else { + if (args.cloudDsn[strlen(args.cloudDsn) - 1] == '\"') { + args.cloudDsn[strlen(args.cloudDsn) - 1] = '\0'; + } + if (args.cloudDsn[0] == '\"') { + args.cloudDsn += 1; + } } } } else { @@ -434,4 +435,4 @@ int tcpConnect(char* host, int iport) { return 1; } return 0; -} \ No newline at end of file +}