Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2d02bb7e
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2d02bb7e
编写于
8月 19, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
8月 19, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3147 from taosdata/hotfix/mergemaster
Master
上级
b7fe1475
05159cc9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
17 addition
and
15 deletion
+17
-15
cmake/platform.inc
cmake/platform.inc
+1
-2
deps/cJson/src/cJSON.c
deps/cJson/src/cJSON.c
+3
-3
src/dnode/src/dnodeMain.c
src/dnode/src/dnodeMain.c
+1
-1
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+3
-2
src/os/inc/osSocket.h
src/os/inc/osSocket.h
+1
-0
src/os/inc/osWindows.h
src/os/inc/osWindows.h
+1
-0
src/os/src/detail/osSysinfo.c
src/os/src/detail/osSysinfo.c
+4
-4
src/util/src/tsocket.c
src/util/src/tsocket.c
+3
-3
未找到文件。
cmake/platform.inc
浏览文件 @
2d02bb7e
...
...
@@ -68,8 +68,7 @@ ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
MESSAGE
(
STATUS
"The current platform is Windows 64-bit"
)
ELSE
()
SET
(
TD_WINDOWS_32
TRUE
)
MESSAGE
(
FATAL_ERROR
"The current platform is Windows 32-bit, not supported yet"
)
EXIT
()
MESSAGE
(
STATUS
"The current platform is Windows 32-bit"
)
ENDIF
()
ELSE
()
MESSAGE
(
FATAL_ERROR
"The current platform is not Linux/Darwin/Windows, stop compile"
)
...
...
deps/cJson/src/cJSON.c
浏览文件 @
2d02bb7e
...
...
@@ -359,12 +359,12 @@ static unsigned char* ensure(printbuffer * const p, size_t needed)
}
/* calculate new buffer size */
if
(
needed
>
(
L
L
ONG_MAX
/
2
))
if
(
needed
>
(
LONG_MAX
/
2
))
{
/* overflow of int, use LLONG_MAX if possible */
if
(
needed
<=
L
L
ONG_MAX
)
if
(
needed
<=
LONG_MAX
)
{
newsize
=
L
L
ONG_MAX
;
newsize
=
LONG_MAX
;
}
else
{
...
...
src/dnode/src/dnodeMain.c
浏览文件 @
2d02bb7e
...
...
@@ -50,7 +50,7 @@ typedef struct {
static
const
SDnodeComponent
tsDnodeComponents
[]
=
{
{
"storage"
,
dnodeInitStorage
,
dnodeCleanupStorage
},
{
"check"
,
dnodeInitCheck
,
dnodeCleanupCheck
},
// NOTES: dnodeInitCheck must be behind the dnode
I
nitStorage component !!!
{
"check"
,
dnodeInitCheck
,
dnodeCleanupCheck
},
// NOTES: dnodeInitCheck must be behind the dnode
i
nitStorage component !!!
{
"vread"
,
dnodeInitVnodeRead
,
dnodeCleanupVnodeRead
},
{
"vwrite"
,
dnodeInitVnodeWrite
,
dnodeCleanupVnodeWrite
},
{
"mread"
,
dnodeInitMnodeRead
,
dnodeCleanupMnodeRead
},
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
2d02bb7e
...
...
@@ -636,6 +636,7 @@ static int32_t mnodeRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void
while
(
numOfRows
<
rows
)
{
pShow
->
pIter
=
mnodeGetNextDb
(
pShow
->
pIter
,
&
pDb
);
if
(
pDb
==
NULL
)
break
;
if
(
pDb
->
pAcct
!=
pUser
->
pAcct
)
continue
;
cols
=
0
;
...
...
@@ -687,8 +688,8 @@ static int32_t mnodeRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
char
tmp
[
128
]
=
{
0
};
s
ize_t
n
=
s
printf
(
tmp
,
"%d,%d,%d"
,
pDb
->
cfg
.
daysToKeep1
,
pDb
->
cfg
.
daysToKeep2
,
pDb
->
cfg
.
daysToKeep
);
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
tmp
,
n
);
sprintf
(
tmp
,
"%d,%d,%d"
,
pDb
->
cfg
.
daysToKeep1
,
pDb
->
cfg
.
daysToKeep2
,
pDb
->
cfg
.
daysToKeep
);
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
tmp
,
strlen
(
tmp
)
);
cols
++
;
#ifndef __CLOUD_VERSION__
...
...
src/os/inc/osSocket.h
浏览文件 @
2d02bb7e
...
...
@@ -25,6 +25,7 @@ extern "C" {
#define taosSendto(sockfd, buf, len, flags, dest_addr, addrlen) sendto(sockfd, buf, len, flags, dest_addr, addrlen)
#define taosReadSocket(fd, buf, len) read(fd, buf, len)
#define taosWriteSocket(fd, buf, len) write(fd, buf, len)
#define taosCloseSocketNoCheck(x) close(x)
#define taosCloseSocket(x) \
{ \
if (FD_VALID(x)) { \
...
...
src/os/inc/osWindows.h
浏览文件 @
2d02bb7e
...
...
@@ -90,6 +90,7 @@ extern "C" {
#define taosSendto(sockfd, buf, len, flags, dest_addr, addrlen) sendto((SOCKET)sockfd, buf, len, flags, dest_addr, addrlen)
#define taosWriteSocket(fd, buf, len) send((SOCKET)fd, buf, len, 0)
#define taosReadSocket(fd, buf, len) recv((SOCKET)fd, buf, len, 0)
#define taosCloseSocketNoCheck(fd) closesocket((SOCKET)fd)
#define taosCloseSocket(fd) closesocket((SOCKET)fd)
typedef
SOCKET
eventfd_t
;
#define eventfd(a, b) -1
...
...
src/os/src/detail/osSysinfo.c
浏览文件 @
2d02bb7e
...
...
@@ -547,12 +547,12 @@ int taosSystem(const char *cmd) {
int
res
;
char
buf
[
1024
];
if
(
cmd
==
NULL
)
{
uError
(
"taosSystem cmd is NULL!
\n
"
);
uError
(
"taosSystem cmd is NULL!"
);
return
-
1
;
}
if
((
fp
=
popen
(
cmd
,
"r"
))
==
NULL
)
{
uError
(
"popen cmd:%s error: %s
/n
"
,
cmd
,
strerror
(
errno
));
uError
(
"popen cmd:%s error: %s"
,
cmd
,
strerror
(
errno
));
return
-
1
;
}
else
{
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp
))
{
...
...
@@ -560,9 +560,9 @@ int taosSystem(const char *cmd) {
}
if
((
res
=
pclose
(
fp
))
==
-
1
)
{
uError
(
"close popen file pointer fp error!
\n
"
);
uError
(
"close popen file pointer fp error!"
);
}
else
{
uDebug
(
"popen res is :%d
\n
"
,
res
);
uDebug
(
"popen res is :%d"
,
res
);
}
return
res
;
...
...
src/util/src/tsocket.c
浏览文件 @
2d02bb7e
...
...
@@ -233,7 +233,7 @@ SOCKET taosOpenUdpSocket(uint32_t ip, uint16_t port) {
if
((
sockFd
=
(
int
)
socket
(
AF_INET
,
SOCK_DGRAM
,
0
))
<=
2
)
{
uError
(
"failed to open udp socket: %d (%s)"
,
errno
,
strerror
(
errno
));
close
(
sockFd
);
taosCloseSocketNoCheck
(
sockFd
);
return
-
1
;
}
...
...
@@ -268,7 +268,7 @@ SOCKET taosOpenTcpClientSocket(uint32_t destIp, uint16_t destPort, uint32_t clie
if
(
sockFd
<=
2
)
{
uError
(
"failed to open the socket: %d (%s)"
,
errno
,
strerror
(
errno
));
close
(
sockFd
);
taosCloseSocketNoCheck
(
sockFd
);
return
-
1
;
}
...
...
@@ -375,7 +375,7 @@ SOCKET taosOpenTcpServerSocket(uint32_t ip, uint16_t port) {
if
((
sockFd
=
(
int
)
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
))
<=
2
)
{
uError
(
"failed to open TCP socket: %d (%s)"
,
errno
,
strerror
(
errno
));
close
(
sockFd
);
taosCloseSocketNoCheck
(
sockFd
);
return
-
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录