Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
XEngine
XEngine Authorize
提交
4d584bc6
X
XEngine Authorize
项目概览
XEngine
/
XEngine Authorize
10 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
XEngine Authorize
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4d584bc6
编写于
8月 10, 2023
作者:
xengine-qyt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed:configure read is incorrent
fixed:mulit login merge time is incorrent
上级
3d951ac6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
15 deletion
+17
-15
XEngine_Source/AuthorizeModule_Configure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
...e_Configure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
+2
-1
XEngine_Source/AuthorizeModule_Session/Session_Authorize/Session_Authorize.cpp
...izeModule_Session/Session_Authorize/Session_Authorize.cpp
+6
-3
XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/Authorize_Net.cpp
...ine_APPService/XEngine_AuthorizeService/Authorize_Net.cpp
+2
-4
XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/Authorize_TCPTask.cpp
...APPService/XEngine_AuthorizeService/Authorize_TCPTask.cpp
+7
-7
未找到文件。
XEngine_Source/AuthorizeModule_Configure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
浏览文件 @
4d584bc6
...
...
@@ -116,7 +116,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
pSt_ServerConfig
->
st_XVerification
.
nTryTime
=
st_JsonXVerification
[
"nTryTime"
].
asInt
();
pSt_ServerConfig
->
st_XVerification
.
nTryMode
=
st_JsonXVerification
[
"nTryMode"
].
asInt
();
//登录配置
if
(
st_JsonRoot
[
"XLogin"
].
empty
()
||
(
6
!=
st_JsonRoot
[
"XLogin"
].
size
()))
if
(
st_JsonRoot
[
"XLogin"
].
empty
()
||
(
7
!=
st_JsonRoot
[
"XLogin"
].
size
()))
{
Config_IsErrorOccur
=
true
;
Config_dwErrorCode
=
ERROR_AUTHORIZE_MODULE_CONFIGURE_XVER
;
...
...
@@ -127,6 +127,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
pSt_ServerConfig
->
st_XLogin
.
bHTTPAuth
=
st_JsonXLogin
[
"bHTTPAuth"
].
asBool
();
pSt_ServerConfig
->
st_XLogin
.
bPassAuth
=
st_JsonXLogin
[
"bPassAuth"
].
asBool
();
pSt_ServerConfig
->
st_XLogin
.
nHTTPAuthTime
=
st_JsonXLogin
[
"nHTTPAuthTime"
].
asInt
();
pSt_ServerConfig
->
st_XLogin
.
nMultiMode
=
st_JsonXLogin
[
"nMultiMode"
].
asInt
();
Json
::
Value
st_JsonXLoginUrl
=
st_JsonXLogin
[
"st_PassUrl"
];
_tcsxcpy
(
pSt_ServerConfig
->
st_XLogin
.
st_PassUrl
.
tszPassLogin
,
st_JsonXLoginUrl
[
"tszPassLogin"
].
asCString
());
...
...
XEngine_Source/AuthorizeModule_Session/Session_Authorize/Session_Authorize.cpp
浏览文件 @
4d584bc6
...
...
@@ -481,10 +481,13 @@ XHTHREAD CSession_Authorize::Session_Authorize_ActiveThread(XPVOID lParam)
{
if
(
ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_MINUTE
==
stl_ListIterator
->
st_UserTable
.
enSerialType
)
{
//通告结束
if
(
nTimeCount
>
stl_ListIterator
->
nLeftTime
)
for
(
auto
stl_ListNotifyIterator
=
stl_ListNotify
.
begin
();
stl_ListNotifyIterator
!=
stl_ListNotify
.
end
();
stl_ListNotifyIterator
++
)
{
stl_ListIterator
->
nLeftTime
=
0
;
if
(
0
==
_tcsxnicmp
(
stl_ListNotifyIterator
->
tszUserAddr
,
stl_ListIterator
->
tszClientAddr
,
_tcsxlen
(
stl_ListNotifyIterator
->
tszUserAddr
)))
{
stl_ListNotifyIterator
->
nTimeLeft
-=
nTimeCount
;
break
;
}
}
}
}
...
...
XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/Authorize_Net.cpp
浏览文件 @
4d584bc6
...
...
@@ -80,9 +80,7 @@ bool XEngine_CloseClient(LPCXSTR lpszClientAddr)
NetCore_TCPXCore_CloseForClientEx
(
xhWSSocket
,
lpszClientAddr
);
NetCore_TCPXCore_CloseForClientEx
(
xhHttpSocket
,
lpszClientAddr
);
XCHAR
tszClientUser
[
64
];
AUTHSESSION_NETCLIENT
st_NETClient
;
memset
(
tszClientUser
,
'\0'
,
sizeof
(
tszClientUser
));
memset
(
&
st_NETClient
,
'\0'
,
sizeof
(
AUTHSESSION_NETCLIENT
));
if
(
Session_Authorize_GetUserForAddr
(
lpszClientAddr
,
&
st_NETClient
))
...
...
@@ -93,7 +91,7 @@ bool XEngine_CloseClient(LPCXSTR lpszClientAddr)
st_AuthTime
.
nTimeLeft
=
st_NETClient
.
nLeftTime
;
st_AuthTime
.
nTimeONLine
=
st_NETClient
.
nOnlineTime
;
st_AuthTime
.
enSerialType
=
st_NETClient
.
st_UserTable
.
enSerialType
;
_tcsxcpy
(
st_AuthTime
.
tszUserName
,
tszClientUser
);
_tcsxcpy
(
st_AuthTime
.
tszUserName
,
st_NETClient
.
st_UserTable
.
st_UserInfo
.
tszUserName
);
_tcsxcpy
(
st_AuthTime
.
tszLeftTime
,
st_NETClient
.
tszLeftTime
);
_tcsxcpy
(
st_AuthTime
.
tszUserAddr
,
st_NETClient
.
tszClientAddr
);
...
...
@@ -107,7 +105,7 @@ bool XEngine_CloseClient(LPCXSTR lpszClientAddr)
APIClient_Http_Request
(
_X
(
"POST"
),
st_AuthConfig
.
st_XLogin
.
st_PassUrl
.
tszPassLogout
,
tszSDBuffer
);
}
Session_Authorize_CloseAddr
(
lpszClientAddr
);
XLOG_PRINT
(
xhLog
,
XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO
,
_X
(
"客户端:%s,用户名:%s,离开服务器,在线时长:%d"
),
lpszClientAddr
,
tszClientUser
,
st_AuthTime
.
nTimeONLine
);
XLOG_PRINT
(
xhLog
,
XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO
,
_X
(
"客户端:%s,用户名:%s,离开服务器,在线时长:%d"
),
lpszClientAddr
,
st_NETClient
.
st_UserTable
.
st_UserInfo
.
tszUserName
,
st_AuthTime
.
nTimeONLine
);
}
else
{
...
...
XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/Authorize_TCPTask.cpp
浏览文件 @
4d584bc6
...
...
@@ -162,7 +162,12 @@ bool XEngine_Client_TCPTask(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n
//找到客户端,支持的模式
if
(
0
==
st_AuthConfig
.
st_XLogin
.
nMultiMode
)
{
if
(
ppSt_ListClient
[
i
]
->
st_UserTable
.
enDeviceType
==
st_AuthProtocol
.
enDeviceType
)
int
nSourceType
=
0
;
int
nDestType
=
0
;
AuthHelp_MultiLogin_GetRange
(
ppSt_ListClient
[
i
]
->
st_UserTable
.
enDeviceType
,
&
nSourceType
);
AuthHelp_MultiLogin_GetRange
(
st_AuthProtocol
.
enDeviceType
,
&
nDestType
);
if
(
nSourceType
==
nDestType
)
{
bLogin
=
true
;
break
;
...
...
@@ -170,12 +175,7 @@ bool XEngine_Client_TCPTask(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n
}
else
{
int
nSourceType
=
0
;
int
nDestType
=
0
;
AuthHelp_MultiLogin_GetRange
(
ppSt_ListClient
[
i
]
->
st_UserTable
.
enDeviceType
,
&
nSourceType
);
AuthHelp_MultiLogin_GetRange
(
st_AuthProtocol
.
enDeviceType
,
&
nDestType
);
if
(
nSourceType
==
nDestType
)
if
(
ppSt_ListClient
[
i
]
->
st_UserTable
.
enDeviceType
==
st_AuthProtocol
.
enDeviceType
)
{
bLogin
=
true
;
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录