Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
bf0a3470
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
bf0a3470
编写于
5月 29, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
5月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2074 from taosdata/develop_lihui
[TD-439]
上级
2f0d82ca
7e0783a5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
34 addition
and
10 deletion
+34
-10
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+4
-2
src/dnode/src/dnodeSystem.c
src/dnode/src/dnodeSystem.c
+6
-2
src/kit/shell/src/shellDarwin.c
src/kit/shell/src/shellDarwin.c
+6
-2
src/kit/shell/src/shellLinux.c
src/kit/shell/src/shellLinux.c
+5
-0
src/kit/shell/src/shellWindows.c
src/kit/shell/src/shellWindows.c
+6
-2
src/plugins/http/src/tgHandle.c
src/plugins/http/src/tgHandle.c
+1
-1
src/util/src/tconfig.c
src/util/src/tconfig.c
+6
-1
未找到文件。
src/dnode/src/dnodeMgmt.c
浏览文件 @
bf0a3470
...
@@ -369,7 +369,8 @@ static void dnodeUpdateMnodeInfos(SDMMnodeInfos *pMnodes) {
...
@@ -369,7 +369,8 @@ static void dnodeUpdateMnodeInfos(SDMMnodeInfos *pMnodes) {
}
}
static
bool
dnodeReadMnodeInfos
()
{
static
bool
dnodeReadMnodeInfos
()
{
char
ipFile
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
ipFile
[
TSDB_FILENAME_LEN
*
2
]
=
{
0
};
sprintf
(
ipFile
,
"%s/mnodeIpList.json"
,
tsDnodeDir
);
sprintf
(
ipFile
,
"%s/mnodeIpList.json"
,
tsDnodeDir
);
FILE
*
fp
=
fopen
(
ipFile
,
"r"
);
FILE
*
fp
=
fopen
(
ipFile
,
"r"
);
if
(
!
fp
)
{
if
(
!
fp
)
{
...
@@ -537,7 +538,8 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
...
@@ -537,7 +538,8 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
}
}
static
bool
dnodeReadDnodeCfg
()
{
static
bool
dnodeReadDnodeCfg
()
{
char
dnodeCfgFile
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
dnodeCfgFile
[
TSDB_FILENAME_LEN
*
2
]
=
{
0
};
sprintf
(
dnodeCfgFile
,
"%s/dnodeCfg.json"
,
tsDnodeDir
);
sprintf
(
dnodeCfgFile
,
"%s/dnodeCfg.json"
,
tsDnodeDir
);
FILE
*
fp
=
fopen
(
dnodeCfgFile
,
"r"
);
FILE
*
fp
=
fopen
(
dnodeCfgFile
,
"r"
);
...
...
src/dnode/src/dnodeSystem.c
浏览文件 @
bf0a3470
...
@@ -28,8 +28,12 @@ int32_t main(int32_t argc, char *argv[]) {
...
@@ -28,8 +28,12 @@ int32_t main(int32_t argc, char *argv[]) {
// Set global configuration file
// Set global configuration file
for
(
int32_t
i
=
1
;
i
<
argc
;
++
i
)
{
for
(
int32_t
i
=
1
;
i
<
argc
;
++
i
)
{
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
if
(
i
<
argc
-
1
)
{
if
(
i
<
argc
-
1
)
{
strcpy
(
configDir
,
argv
[
++
i
]);
if
(
strlen
(
argv
[
++
i
])
>
TSDB_FILENAME_LEN
-
1
)
{
printf
(
"config file path overflow"
);
exit
(
EXIT_FAILURE
);
}
strcpy
(
configDir
,
argv
[
i
]);
}
else
{
}
else
{
printf
(
"'-c' requires a parameter, default:%s
\n
"
,
configDir
);
printf
(
"'-c' requires a parameter, default:%s
\n
"
,
configDir
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
...
...
src/kit/shell/src/shellDarwin.c
浏览文件 @
bf0a3470
...
@@ -96,8 +96,12 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
...
@@ -96,8 +96,12 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
if
(
i
<
argc
-
1
)
{
if
(
i
<
argc
-
1
)
{
strcpy
(
configDir
,
argv
[
++
i
]);
if
(
strlen
(
argv
[
++
i
])
>
TSDB_FILENAME_LEN
-
1
)
{
fprintf
(
stderr
,
"config file path: %s overflow max len %d
\n
"
,
argv
[
i
],
TSDB_FILENAME_LEN
-
1
);
exit
(
EXIT_FAILURE
);
}
strcpy
(
configDir
,
argv
[
i
]);
}
else
{
}
else
{
fprintf
(
stderr
,
"Option -c requires an argument
\n
"
);
fprintf
(
stderr
,
"Option -c requires an argument
\n
"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
...
...
src/kit/shell/src/shellLinux.c
浏览文件 @
bf0a3470
...
@@ -80,6 +80,11 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
...
@@ -80,6 +80,11 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
if
(
wordexp
(
arg
,
&
full_path
,
0
)
!=
0
)
{
if
(
wordexp
(
arg
,
&
full_path
,
0
)
!=
0
)
{
fprintf
(
stderr
,
"Invalid path %s
\n
"
,
arg
);
fprintf
(
stderr
,
"Invalid path %s
\n
"
,
arg
);
return
-
1
;
return
-
1
;
}
if
(
strlen
(
full_path
.
we_wordv
[
0
])
>
TSDB_FILENAME_LEN
-
1
)
{
fprintf
(
stderr
,
"config file path: %s overflow max len %d
\n
"
,
full_path
.
we_wordv
[
0
],
TSDB_FILENAME_LEN
-
1
);
wordfree
(
&
full_path
);
return
-
1
;
}
}
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
wordfree
(
&
full_path
);
wordfree
(
&
full_path
);
...
...
src/kit/shell/src/shellWindows.c
浏览文件 @
bf0a3470
...
@@ -76,8 +76,12 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
...
@@ -76,8 +76,12 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
if
(
i
<
argc
-
1
)
{
if
(
i
<
argc
-
1
)
{
strcpy
(
configDir
,
argv
[
++
i
]);
if
(
strlen
(
argv
[
++
i
])
>
TSDB_FILENAME_LEN
-
1
)
{
fprintf
(
stderr
,
"config file path: %s overflow max len %d
\n
"
,
argv
[
i
],
TSDB_FILENAME_LEN
-
1
);
exit
(
EXIT_FAILURE
);
}
strcpy
(
configDir
,
argv
[
i
]);
}
else
{
}
else
{
fprintf
(
stderr
,
"Option -c requires an argument
\n
"
);
fprintf
(
stderr
,
"Option -c requires an argument
\n
"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
...
...
src/plugins/http/src/tgHandle.c
浏览文件 @
bf0a3470
...
@@ -281,7 +281,7 @@ int tgReadSchema(char *fileName) {
...
@@ -281,7 +281,7 @@ int tgReadSchema(char *fileName) {
}
}
void
tgInitHandle
(
HttpServer
*
pServer
)
{
void
tgInitHandle
(
HttpServer
*
pServer
)
{
char
fileName
[
256
]
=
{
0
};
char
fileName
[
TSDB_FILENAME_LEN
*
2
]
=
{
0
};
sprintf
(
fileName
,
"%s/taos.telegraf.cfg"
,
configDir
);
sprintf
(
fileName
,
"%s/taos.telegraf.cfg"
,
configDir
);
if
(
tgReadSchema
(
fileName
)
<=
0
)
{
if
(
tgReadSchema
(
fileName
)
<=
0
)
{
tgFreeSchemas
();
tgFreeSchemas
();
...
...
src/util/src/tconfig.c
浏览文件 @
bf0a3470
...
@@ -241,7 +241,12 @@ void taosReadGlobalLogCfg() {
...
@@ -241,7 +241,12 @@ void taosReadGlobalLogCfg() {
wordexp_t
full_path
;
wordexp_t
full_path
;
wordexp
(
configDir
,
&
full_path
,
0
);
wordexp
(
configDir
,
&
full_path
,
0
);
if
(
full_path
.
we_wordv
!=
NULL
&&
full_path
.
we_wordv
[
0
]
!=
NULL
)
{
if
(
full_path
.
we_wordv
!=
NULL
&&
full_path
.
we_wordv
[
0
]
!=
NULL
)
{
if
(
strlen
(
full_path
.
we_wordv
[
0
])
>
TSDB_FILENAME_LEN
-
1
)
{
printf
(
"
\n
config file: %s path overflow max len %d, all variables are set to default
\n
"
,
full_path
.
we_wordv
[
0
],
TSDB_FILENAME_LEN
-
1
);
wordfree
(
&
full_path
);
return
;
}
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
}
else
{
}
else
{
printf
(
"configDir:%s not there, use default value: /etc/taos"
,
configDir
);
printf
(
"configDir:%s not there, use default value: /etc/taos"
,
configDir
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录