Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c2801a46
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看板
提交
c2801a46
编写于
12月 18, 2020
作者:
M
Minglei Jin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2484]<fix>: use IPv4's AI_INET instead of AI_UNSPEC
上级
74cd0d3a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
8 deletion
+8
-8
src/dnode/src/dnodeTelemetry.c
src/dnode/src/dnodeTelemetry.c
+2
-2
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+1
-1
src/sync/src/syncMain.c
src/sync/src/syncMain.c
+1
-1
src/util/inc/tsocket.h
src/util/inc/tsocket.h
+1
-1
src/util/src/tnettest.c
src/util/src/tnettest.c
+1
-1
src/util/src/tsocket.c
src/util/src/tsocket.c
+2
-2
未找到文件。
src/dnode/src/dnodeTelemetry.c
浏览文件 @
c2801a46
...
...
@@ -195,7 +195,7 @@ static void addRuntimeInfo(SBufferWriter* bw) {
static
void
sendTelemetryReport
()
{
char
buf
[
128
];
uint32_t
ip
=
taosGetIpFromFqdn
(
TELEMETRY_SERVER
);
uint32_t
ip
=
taosGetIp
v4
FromFqdn
(
TELEMETRY_SERVER
);
if
(
ip
==
0xffffffff
)
{
dTrace
(
"failed to get IP address of "
TELEMETRY_SERVER
", reason:%s"
,
strerror
(
errno
));
return
;
...
...
@@ -308,4 +308,4 @@ void dnodeCleanupTelemetry() {
pthread_join
(
tsTelemetryThread
,
NULL
);
tsem_destroy
(
&
tsExitSem
);
}
}
\ No newline at end of file
}
src/rpc/src/rpcMain.c
浏览文件 @
c2801a46
...
...
@@ -576,7 +576,7 @@ static void rpcFreeMsg(void *msg) {
static
SRpcConn
*
rpcOpenConn
(
SRpcInfo
*
pRpc
,
char
*
peerFqdn
,
uint16_t
peerPort
,
int8_t
connType
)
{
SRpcConn
*
pConn
;
uint32_t
peerIp
=
taosGetIpFromFqdn
(
peerFqdn
);
uint32_t
peerIp
=
taosGetIp
v4
FromFqdn
(
peerFqdn
);
if
(
peerIp
==
0xFFFFFFFF
)
{
tError
(
"%s, failed to resolve FQDN:%s"
,
pRpc
->
label
,
peerFqdn
);
terrno
=
TSDB_CODE_RPC_FQDN_ERROR
;
...
...
src/sync/src/syncMain.c
浏览文件 @
c2801a46
...
...
@@ -486,7 +486,7 @@ static void syncRemovePeer(SSyncPeer *pPeer) {
}
static
SSyncPeer
*
syncAddPeer
(
SSyncNode
*
pNode
,
const
SNodeInfo
*
pInfo
)
{
uint32_t
ip
=
taosGetIpFromFqdn
(
pInfo
->
nodeFqdn
);
uint32_t
ip
=
taosGetIp
v4
FromFqdn
(
pInfo
->
nodeFqdn
);
if
(
ip
==
0xFFFFFFFF
)
{
sError
(
"failed to add peer, can resolve fqdn:%s since %s"
,
pInfo
->
nodeFqdn
,
strerror
(
errno
));
terrno
=
TSDB_CODE_RPC_FQDN_ERROR
;
...
...
src/util/inc/tsocket.h
浏览文件 @
c2801a46
...
...
@@ -33,7 +33,7 @@ SOCKET taosOpenTcpServerSocket(uint32_t ip, uint16_t port);
int32_t
taosKeepTcpAlive
(
SOCKET
sockFd
);
int32_t
taosGetFqdn
(
char
*
);
uint32_t
taosGetIpFromFqdn
(
const
char
*
);
uint32_t
taosGetIp
v4
FromFqdn
(
const
char
*
);
void
tinet_ntoa
(
char
*
ipstr
,
uint32_t
ip
);
uint32_t
ip2uint
(
const
char
*
const
ip_addr
);
...
...
src/util/src/tnettest.c
浏览文件 @
c2801a46
...
...
@@ -449,7 +449,7 @@ static void taosNetTestClient(char *host, int32_t startPort, int32_t pkgLen) {
int32_t
endPort
=
startPort
+
11
;
uInfo
(
"work as client, host:%s startPort:%d endPort:%d pkgLen:%d
\n
"
,
host
,
startPort
,
endPort
,
pkgLen
);
uint32_t
serverIp
=
taosGetIpFromFqdn
(
host
);
uint32_t
serverIp
=
taosGetIp
v4
FromFqdn
(
host
);
if
(
serverIp
==
0xFFFFFFFF
)
{
uError
(
"failed to resolve fqdn:%s"
,
host
);
exit
(
-
1
);
...
...
src/util/src/tsocket.c
浏览文件 @
c2801a46
...
...
@@ -40,9 +40,9 @@ int32_t taosGetFqdn(char *fqdn) {
return
0
;
}
uint32_t
taosGetIpFromFqdn
(
const
char
*
fqdn
)
{
uint32_t
taosGetIp
v4
FromFqdn
(
const
char
*
fqdn
)
{
struct
addrinfo
hints
=
{
0
};
hints
.
ai_family
=
AF_
UNSPEC
;
hints
.
ai_family
=
AF_
INET
;
hints
.
ai_socktype
=
SOCK_STREAM
;
struct
addrinfo
*
result
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录