提交 918d3cca 编写于 作者: K kailixu

chore: more check

上级 3fd349d1
......@@ -22,7 +22,7 @@
#define STR_STR_SIGN ("ia")
#define DM_INIT_MON() \
do { \
code = (int32_t)((2147483648 | ((0) << 7 | (298)))); \
code = (int32_t)(2147483648 | 298); \
strncpy(stName, tsVersionName, 64); \
monCfg.maxLogs = tsMonitorMaxLogs; \
monCfg.port = tsMonitorPort; \
......@@ -76,7 +76,7 @@ static int32_t dmInitMonitor() {
DM_ERR_RTN(0);
}
if (taosGetOsReleaseName(reName, stName, ver, 64) != 0) {
goto _exit;
DM_ERR_RTN(code);
}
if (STR_CASE_CMP(stName, dmOS[0])) {
if (STR_INT_CMP(ver, 17, >)) {
......
......@@ -373,6 +373,7 @@ int32_t taosGetOsReleaseName(char *releaseName, char* sName, char* ver, int32_t
dest = sName;
} else if (strncmp(line, "PRETTY_NAME", 11) == 0) {
dest = releaseName;
code = 0;
} else if (strncmp(line, "VERSION_ID", 10) == 0) {
dest = ver;
} else {
......@@ -386,10 +387,7 @@ int32_t taosGetOsReleaseName(char *releaseName, char* sName, char* ver, int32_t
}
tstrncpy(dest, p, maxLen);
if (++cnt >= 3) {
code = 0;
break;
}
if (++cnt >= 3) break;
}
taosCloseFile(&pFile);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册