Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d6362604
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看板
未验证
提交
d6362604
编写于
8月 15, 2022
作者:
dengyihao
提交者:
GitHub
8月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16102 from taosdata/enh/refactorRpcCode
refactor code
上级
6248d57d
a105e399
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
6 addition
and
6 deletion
+6
-6
source/libs/transport/inc/transComm.h
source/libs/transport/inc/transComm.h
+1
-1
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+2
-2
source/libs/transport/src/transComm.c
source/libs/transport/src/transComm.c
+1
-1
source/libs/transport/src/transSvr.c
source/libs/transport/src/transSvr.c
+2
-2
未找到文件。
source/libs/transport/inc/transComm.h
浏览文件 @
d6362604
...
@@ -293,7 +293,7 @@ int transSendResponse(const STransMsg* msg);
...
@@ -293,7 +293,7 @@ int transSendResponse(const STransMsg* msg);
int
transRegisterMsg
(
const
STransMsg
*
msg
);
int
transRegisterMsg
(
const
STransMsg
*
msg
);
int
transSetDefaultAddr
(
void
*
shandle
,
const
char
*
ip
,
const
char
*
fqdn
);
int
transSetDefaultAddr
(
void
*
shandle
,
const
char
*
ip
,
const
char
*
fqdn
);
int
trans
GetSockDebugInfo
(
struct
sockaddr
*
sockname
,
char
*
dst
);
int
trans
SockInfo2Str
(
struct
sockaddr
*
sockname
,
char
*
dst
);
int64_t
transAllocHandle
();
int64_t
transAllocHandle
();
...
...
source/libs/transport/src/transCli.c
浏览文件 @
d6362604
...
@@ -826,11 +826,11 @@ void cliConnCb(uv_connect_t* req, int status) {
...
@@ -826,11 +826,11 @@ void cliConnCb(uv_connect_t* req, int status) {
int
addrlen
=
sizeof
(
peername
);
int
addrlen
=
sizeof
(
peername
);
uv_tcp_getpeername
((
uv_tcp_t
*
)
pConn
->
stream
,
&
peername
,
&
addrlen
);
uv_tcp_getpeername
((
uv_tcp_t
*
)
pConn
->
stream
,
&
peername
,
&
addrlen
);
trans
GetSockDebugInfo
(
&
peername
,
pConn
->
dst
);
trans
SockInfo2Str
(
&
peername
,
pConn
->
dst
);
addrlen
=
sizeof
(
sockname
);
addrlen
=
sizeof
(
sockname
);
uv_tcp_getsockname
((
uv_tcp_t
*
)
pConn
->
stream
,
&
sockname
,
&
addrlen
);
uv_tcp_getsockname
((
uv_tcp_t
*
)
pConn
->
stream
,
&
sockname
,
&
addrlen
);
trans
GetSockDebugInfo
(
&
sockname
,
pConn
->
src
);
trans
SockInfo2Str
(
&
sockname
,
pConn
->
src
);
tTrace
(
"%s conn %p connect to server successfully"
,
CONN_GET_INST_LABEL
(
pConn
),
pConn
);
tTrace
(
"%s conn %p connect to server successfully"
,
CONN_GET_INST_LABEL
(
pConn
),
pConn
);
assert
(
pConn
->
stream
==
req
->
handle
);
assert
(
pConn
->
stream
==
req
->
handle
);
...
...
source/libs/transport/src/transComm.c
浏览文件 @
d6362604
...
@@ -77,7 +77,7 @@ void transFreeMsg(void* msg) {
...
@@ -77,7 +77,7 @@ void transFreeMsg(void* msg) {
}
}
taosMemoryFree
((
char
*
)
msg
-
sizeof
(
STransMsgHead
));
taosMemoryFree
((
char
*
)
msg
-
sizeof
(
STransMsgHead
));
}
}
int
trans
GetSockDebugInfo
(
struct
sockaddr
*
sockname
,
char
*
dst
)
{
int
trans
SockInfo2Str
(
struct
sockaddr
*
sockname
,
char
*
dst
)
{
struct
sockaddr_in
addr
=
*
(
struct
sockaddr_in
*
)
sockname
;
struct
sockaddr_in
addr
=
*
(
struct
sockaddr_in
*
)
sockname
;
char
buf
[
20
]
=
{
0
};
char
buf
[
20
]
=
{
0
};
...
...
source/libs/transport/src/transSvr.c
浏览文件 @
d6362604
...
@@ -698,7 +698,7 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) {
...
@@ -698,7 +698,7 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) {
transUnrefSrvHandle
(
pConn
);
transUnrefSrvHandle
(
pConn
);
return
;
return
;
}
}
trans
GetSockDebugInfo
(
&
peername
,
pConn
->
dst
);
trans
SockInfo2Str
(
&
peername
,
pConn
->
dst
);
addrlen
=
sizeof
(
sockname
);
addrlen
=
sizeof
(
sockname
);
if
(
0
!=
uv_tcp_getsockname
(
pConn
->
pTcp
,
(
struct
sockaddr
*
)
&
sockname
,
&
addrlen
))
{
if
(
0
!=
uv_tcp_getsockname
(
pConn
->
pTcp
,
(
struct
sockaddr
*
)
&
sockname
,
&
addrlen
))
{
...
@@ -706,7 +706,7 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) {
...
@@ -706,7 +706,7 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) {
transUnrefSrvHandle
(
pConn
);
transUnrefSrvHandle
(
pConn
);
return
;
return
;
}
}
trans
GetSockDebugInfo
(
&
sockname
,
pConn
->
src
);
trans
SockInfo2Str
(
&
sockname
,
pConn
->
src
);
struct
sockaddr_in
addr
=
*
(
struct
sockaddr_in
*
)
&
sockname
;
struct
sockaddr_in
addr
=
*
(
struct
sockaddr_in
*
)
&
sockname
;
pConn
->
clientIp
=
addr
.
sin_addr
.
s_addr
;
pConn
->
clientIp
=
addr
.
sin_addr
.
s_addr
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录