Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷面1992
TDengine
提交
156fa5d4
TDengine
项目概览
冷面1992
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
156fa5d4
编写于
2月 24, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
compile for rpc rename index
上级
15506d57
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
16 addition
and
15 deletion
+16
-15
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/client/src/tscSql.c
src/client/src/tscSql.c
+1
-1
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+1
-1
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+2
-2
src/mnode/src/mgmtUser.c
src/mnode/src/mgmtUser.c
+10
-9
未找到文件。
src/client/src/tscServer.c
浏览文件 @
156fa5d4
...
...
@@ -62,7 +62,7 @@ void tscPrintMgmtIp() {
void
tscSetMgmtIpListFromCluster
(
SRpcIpSet
*
pIpList
)
{
tscMgmtIpList
.
numOfIps
=
htons
(
pIpList
->
numOfIps
);
tscMgmtIpList
.
in
dex
=
htons
(
pIpList
->
index
);
tscMgmtIpList
.
in
Use
=
htons
(
pIpList
->
inUse
);
tscMgmtIpList
.
port
=
htons
(
pIpList
->
port
);
for
(
int32_t
i
=
0
;
i
<
tscMgmtIpList
.
numOfIps
;
++
i
)
{
tscMgmtIpList
.
ip
[
i
]
=
pIpList
->
ip
[
i
];
...
...
@@ -72,7 +72,7 @@ void tscSetMgmtIpListFromCluster(SRpcIpSet *pIpList) {
void
tscSetMgmtIpListFromEdge
()
{
if
(
tscMgmtIpList
.
numOfIps
!=
1
)
{
tscMgmtIpList
.
numOfIps
=
1
;
tscMgmtIpList
.
in
dex
=
0
;
tscMgmtIpList
.
in
Use
=
0
;
tscMgmtIpList
.
port
=
tsMgmtShellPort
;
tscMgmtIpList
.
ip
[
0
]
=
inet_addr
(
tsMasterIp
);
tscTrace
(
"edge mgmt IP list:"
);
...
...
src/client/src/tscSql.c
浏览文件 @
156fa5d4
...
...
@@ -65,7 +65,7 @@ TAOS *taos_connect_imp(const char *ip, const char *user, const char *pass, const
}
if
(
ip
&&
ip
[
0
])
{
tscMgmtIpList
.
in
dex
=
0
;
tscMgmtIpList
.
in
Use
=
0
;
tscMgmtIpList
.
port
=
tsMgmtShellPort
;
tscMgmtIpList
.
numOfIps
=
1
;
tscMgmtIpList
.
ip
[
0
]
=
inet_addr
(
ip
);
...
...
src/client/src/tscSystem.c
浏览文件 @
156fa5d4
...
...
@@ -150,7 +150,7 @@ void taos_init_imp() {
taosInitNote
(
tsNumOfLogLines
/
10
,
1
,
(
char
*
)
"tsc_note"
);
}
tscMgmtIpList
.
in
dex
=
0
;
tscMgmtIpList
.
in
Use
=
0
;
tscMgmtIpList
.
port
=
tsMgmtShellPort
;
tscMgmtIpList
.
numOfIps
=
1
;
tscMgmtIpList
.
ip
[
0
]
=
inet_addr
(
tsMasterIp
);
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
156fa5d4
...
...
@@ -944,7 +944,7 @@ int32_t mgmtProcessHeartBeatMsg(void *pCont, int32_t contLen, void *ahandle) {
SRpcConnInfo
connInfo
;
rpcGetConnInfo
(
ahandle
,
&
connInfo
);
pHBRsp
->
ipList
.
in
dex
=
0
;
pHBRsp
->
ipList
.
in
Use
=
0
;
pHBRsp
->
ipList
.
port
=
htons
(
tsMgmtShellPort
);
pHBRsp
->
ipList
.
numOfIps
=
0
;
if
(
pSdbPublicIpList
!=
NULL
&&
pSdbIpList
!=
NULL
)
{
...
...
@@ -1035,7 +1035,7 @@ static int32_t mgmtProcessConnectMsg(void *pCont, int32_t contLen, void *thandle
strcpy
(
pConnectRsp
->
serverVersion
,
version
);
pConnectRsp
->
writeAuth
=
pUser
->
writeAuth
;
pConnectRsp
->
superAuth
=
pUser
->
superAuth
;
pConnectRsp
->
ipList
.
in
dex
=
0
;
pConnectRsp
->
ipList
.
in
Use
=
0
;
pConnectRsp
->
ipList
.
port
=
htons
(
tsMgmtShellPort
);
pConnectRsp
->
ipList
.
numOfIps
=
0
;
if
(
pSdbPublicIpList
!=
NULL
&&
pSdbIpList
!=
NULL
)
{
...
...
src/mnode/src/mgmtUser.c
浏览文件 @
156fa5d4
...
...
@@ -24,6 +24,7 @@
#include "mgmtTable.h"
void
*
tsUserSdb
=
NULL
;
static
int32_t
tsUserUpdateSize
=
0
;
void
*
(
*
mgmtUserActionFp
[
SDB_MAX_ACTION_TYPES
])(
void
*
row
,
char
*
str
,
int32_t
size
,
int32_t
*
ssize
);
void
*
mgmtUserActionInsert
(
void
*
row
,
char
*
str
,
int32_t
size
,
int32_t
*
ssize
);
...
...
@@ -59,7 +60,10 @@ int32_t mgmtInitUsers() {
mgmtUserActionInit
();
tsUserSdb
=
sdbOpenTable
(
tsMaxUsers
,
sizeof
(
SUserObj
),
"user"
,
SDB_KEYTYPE_STRING
,
tsMgmtDirectory
,
mgmtUserAction
);
SUserObj
tObj
;
tsUserUpdateSize
=
tObj
.
updateEnd
-
(
int8_t
*
)
&
tObj
;
tsUserSdb
=
sdbOpenTable
(
tsMaxUsers
,
tsUserUpdateSize
,
"user"
,
SDB_KEYTYPE_STRING
,
tsMgmtDirectory
,
mgmtUserAction
);
if
(
tsUserSdb
==
NULL
)
{
mError
(
"failed to init user data"
);
return
-
1
;
...
...
@@ -265,12 +269,11 @@ void *mgmtUserActionUpdate(void *row, char *str, int32_t size, int32_t *ssize) {
void
*
mgmtUserActionEncode
(
void
*
row
,
char
*
str
,
int32_t
size
,
int32_t
*
ssize
)
{
SUserObj
*
pUser
=
(
SUserObj
*
)
row
;
int32_t
tsize
=
pUser
->
updateEnd
-
(
int8_t
*
)
pUser
;
if
(
size
<
tsize
)
{
if
(
size
<
tsUserUpdateSize
)
{
*
ssize
=
-
1
;
}
else
{
memcpy
(
str
,
pUser
,
tsize
);
*
ssize
=
tsize
;
memcpy
(
str
,
pUser
,
ts
UserUpdateS
ize
);
*
ssize
=
ts
UserUpdateS
ize
;
}
return
NULL
;
...
...
@@ -281,8 +284,7 @@ void *mgmtUserActionDecode(void *row, char *str, int32_t size, int32_t *ssize) {
if
(
pUser
==
NULL
)
return
NULL
;
memset
(
pUser
,
0
,
sizeof
(
SUserObj
));
int32_t
tsize
=
pUser
->
updateEnd
-
(
int8_t
*
)
pUser
;
memcpy
(
pUser
,
str
,
tsize
);
memcpy
(
pUser
,
str
,
tsUserUpdateSize
);
return
(
void
*
)
pUser
;
}
...
...
@@ -290,8 +292,7 @@ void *mgmtUserActionDecode(void *row, char *str, int32_t size, int32_t *ssize) {
void
*
mgmtUserActionReset
(
void
*
row
,
char
*
str
,
int32_t
size
,
int32_t
*
ssize
)
{
SUserObj
*
pUser
=
(
SUserObj
*
)
row
;
int32_t
tsize
=
pUser
->
updateEnd
-
(
int8_t
*
)
pUser
;
memcpy
(
pUser
,
str
,
tsize
);
memcpy
(
pUser
,
str
,
tsUserUpdateSize
);
return
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录