提交 daa8852e 编写于 作者: X xywang

fix: fixed OEM bugs on Windows

上级 23b498bc
...@@ -47,7 +47,7 @@ int32_t tscNumOfObj = 0; // number of sqlObj in current process. ...@@ -47,7 +47,7 @@ int32_t tscNumOfObj = 0; // number of sqlObj in current process.
static void *tscCheckDiskUsageTmr; static void *tscCheckDiskUsageTmr;
void *tscRpcCache; // cache to keep rpc obj void *tscRpcCache; // cache to keep rpc obj
int32_t tscNumOfThreads = 1; // num of rpc threads int32_t tscNumOfThreads = 1; // num of rpc threads
char tscLogFileName[12] = "taoslog"; char tscLogFileName[] = "taoslog";
int tscLogFileNum = 10; int tscLogFileNum = 10;
static pthread_mutex_t rpcObjMutex; // mutex to protect open the rpc obj concurrently static pthread_mutex_t rpcObjMutex; // mutex to protect open the rpc obj concurrently
......
...@@ -250,14 +250,15 @@ void shellParseArgument(int argc, char *argv[], SShellArguments *arguments) { ...@@ -250,14 +250,15 @@ void shellParseArgument(int argc, char *argv[], SShellArguments *arguments) {
if (args.cloudDsn == NULL) { if (args.cloudDsn == NULL) {
if (args.cloud) { if (args.cloud) {
args.cloudDsn = getenv("TDENGINE_CLOUD_DSN"); 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) { if (args.cloudDsn == NULL) {
args.cloud = false; 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 { } else {
...@@ -434,4 +435,4 @@ int tcpConnect(char* host, int iport) { ...@@ -434,4 +435,4 @@ int tcpConnect(char* host, int iport) {
return 1; return 1;
} }
return 0; return 0;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册