This commit is contained in:
luoliangyi 2022-12-15 20:05:06 +08:00
parent 412181ac90
commit b802ee2873
2 changed files with 3 additions and 7 deletions

View File

@ -7,12 +7,10 @@
/* 账户在其他地方登录 */ /* 账户在其他地方登录 */
#define HGPDTTOOLDB_USEREVENT_CONFLICT 1L #define HGPDTTOOLDB_USEREVENT_CONFLICT 1L
/* 网络错误 */
#define HGPDTTOOLDB_USEREVENT_NETERROR 2L
/* 被管理员账户强制下线 */ /* 被管理员账户强制下线 */
#define HGPDTTOOLDB_USEREVENT_REFUSE 3L #define HGPDTTOOLDB_USEREVENT_REFUSE 2L
/* 数据库异常 */ /* 数据库异常 */
#define HGPDTTOOLDB_USEREVENT_DBERROR 4L #define HGPDTTOOLDB_USEREVENT_DBERROR 3L
/* 管理员账户 */ /* 管理员账户 */
#define HGPDTTOOLDB_USERTYPE_ROOT 1L #define HGPDTTOOLDB_USERTYPE_ROOT 1L

View File

@ -1004,9 +1004,7 @@ void HGAPI HGPdtToolDbUserMgrImpl::ThreadFunc(HGThread thread, HGPointer param)
int ret = GetUserLoginInfo(p->m_sql, p->m_userName.c_str(), connectId, takeUserName); int ret = GetUserLoginInfo(p->m_sql, p->m_userName.c_str(), connectId, takeUserName);
if (0 != ret) if (0 != ret)
{ {
int errNo = mysql_errno(p->m_sql); event = HGPDTTOOLDB_USEREVENT_DBERROR;
HGBase_WriteInfo(HGBASE_INFOTYPE_ERROR, "HGPdtToolDbUserMgrImpl::ThreadFunc mysql error=%d", errNo);
event = (errNo >= 1158 && errNo <= 1161) ? HGPDTTOOLDB_USEREVENT_NETERROR : HGPDTTOOLDB_USEREVENT_DBERROR;
} }
else if (takeUserName == "root" && takeUserName != p->m_userName) else if (takeUserName == "root" && takeUserName != p->m_userName)
{ {