|
|
@@ -95,9 +95,7 @@ DWORD CAccessAuthConn::HandleUpdateWKRet(const CSmartPointer<IPackage> &pRecvPkg
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = dwUserCode;
|
|
|
- LogWarn(Severity_Middle, (ErrorCodeEnum)dwSysCode, dwUserCode,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", rc,"strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
-
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -146,11 +144,7 @@ DWORD CAccessAuthConn::HandleReqTokenRet(const CSmartPointer<IPackage> &pRecvPkg
|
|
|
{
|
|
|
rc = dwUserCode;
|
|
|
((CAccessAuthEntity*)m_pEntity)->SetAuthErrMsg(strErrMsg.c_str());
|
|
|
- spFunction->SetSysVar("AuthErrMsg", strErrMsg.c_str(), false);
|
|
|
-
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, rc,
|
|
|
- GetOutPutStr("%s%s%s%08X%s%s", "GetErrMsg",
|
|
|
- "False", "dwUserCode", rc,"strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg, true);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -237,9 +231,7 @@ DWORD CAccessAuthConn::HandleTermExitRet(const CSmartPointer<IPackage> &pRecvPkg
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = (ErrorCodeEnum)dwSysCode;
|
|
|
-
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_TERM_EXIT,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", dwSysCode, "strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, ERR_ACCESSAUTH_TERM_EXIT, strErrMsg);
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
@@ -254,8 +246,7 @@ DWORD CAccessAuthConn::HandleReportStageRet(const CSmartPointer<IPackage> &pRecv
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = (ErrorCodeEnum)dwSysCode;
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_REPORT_STATE,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", dwSysCode, "strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, ERR_ACCESSAUTH_REPORT_STATE, strErrMsg);
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
@@ -959,8 +950,7 @@ DWORD CAccessAuthConn::SendSyncTimePackageNew()
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = dwUserCode;
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, rc,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", rc, "strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -1026,9 +1016,8 @@ DWORD CAccessAuthConn::HandleSyncTimeRet(const CSmartPointer<IPackage> &pRecvPkg
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = dwUserCode;
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, rc,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", rc,"strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
((CAccessAuthEntity*)m_pEntity)->SetAuthErrMsg(strErrMsg.c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -1136,9 +1125,7 @@ DWORD CAccessAuthConn::HandleInitDeviceRet(const CSmartPointer<IPackage> &pRecvP
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = (ErrorCodeEnum)dwSysCode;
|
|
|
-
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_INIT_DEV,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", rc,"strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, ERR_ACCESSAUTH_INIT_DEV, strErrMsg);
|
|
|
}
|
|
|
else if (m_ctxInitDev == NULL)
|
|
|
{
|
|
|
@@ -1212,8 +1199,7 @@ DWORD CAccessAuthConn::HandleReportStateRet(const CSmartPointer<IPackage> &pRecv
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = dwUserCode;
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, rc,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", dwSysCode,"strErrMsg", strErrMsg.c_str()).c_str());
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg);
|
|
|
}
|
|
|
|
|
|
return rc;
|
|
|
@@ -1261,12 +1247,7 @@ DWORD CAccessAuthConn::HandleLockStateRet(const CSmartPointer<IPackage> &pRecvPk
|
|
|
{
|
|
|
rc = dwUserCode;
|
|
|
((CAccessAuthEntity*)m_pEntity)->SetAuthErrMsg(strErrMsg.c_str());
|
|
|
- CSmartPointer<IEntityFunction> spFunction = m_pEntity->GetFunction();
|
|
|
- spFunction->SetSysVar("AuthErrMsg", strErrMsg.c_str(), false);
|
|
|
-
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, rc,
|
|
|
- GetOutPutStr("%s%08X%s%s", "GetErrMsg", rc,"AuthErrMsg", strErrMsg.c_str()).c_str());
|
|
|
-
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg, true);
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
@@ -1367,10 +1348,8 @@ DWORD CAccessAuthConn::HandleCheckMD5Ret(const CSmartPointer<IPackage> &pRecvPkg
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = (ErrorCodeEnum)dwSysCode;
|
|
|
- LogError(Severity_Middle, (ErrorCodeEnum)dwSysCode, dwUserCode, strErrMsg.c_str());
|
|
|
((CAccessAuthEntity*)m_pEntity)->SetAuthErrMsg(strErrMsg.c_str());
|
|
|
- CSmartPointer<IEntityFunction> spFunction = m_pEntity->GetFunction();
|
|
|
- spFunction->SetSysVar("AuthErrMsg", strErrMsg.c_str(), false);
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg, true);
|
|
|
}
|
|
|
|
|
|
m_pFSM->PostEventFIFO(new FSMEvent(rc==Error_Succeed ? CAccessAuthFSM::Event_CheckMD5Succ:CAccessAuthFSM::Event_CheckMD5Fail));
|
|
|
@@ -1387,10 +1366,8 @@ DWORD CAccessAuthConn::HandleUpdateMD5Ret(const CSmartPointer<IPackage> &pRecvPk
|
|
|
if (pRecvPkg->GetErrMsg(dwSysCode, dwUserCode, strErrMsg))
|
|
|
{
|
|
|
rc = (ErrorCodeEnum)dwSysCode;
|
|
|
- LogError(Severity_Middle, (ErrorCodeEnum)dwSysCode, dwUserCode, strErrMsg.c_str());
|
|
|
((CAccessAuthEntity*)m_pEntity)->SetAuthErrMsg(strErrMsg.c_str());
|
|
|
- CSmartPointer<IEntityFunction> spFunction = m_pEntity->GetFunction();
|
|
|
- spFunction->SetSysVar("AuthErrMsg", strErrMsg.c_str(), false);
|
|
|
+ ((CAccessAuthEntity*)m_pEntity)->WarnAuthErrMsg(rc, rc, strErrMsg, true);
|
|
|
}
|
|
|
|
|
|
m_pFSM->PostEventFIFO(new FSMEvent(rc==Error_Succeed ? CAccessAuthFSM::Event_CheckMD5Succ:CAccessAuthFSM::Event_CheckMD5Fail));
|