瀏覽代碼

#IQRV #comment 移除无用的代码

80374374 11 月之前
父節點
當前提交
67a043f5e7

+ 0 - 44
Module/mod_accessauth/AccessAuthFSM.cpp

@@ -787,50 +787,6 @@ bool CAccessAuthFSM::DecryptWithSessionKey(BYTE* encText, int encTextLen, BYTE*
 	return true;
 }
 
-int CAccessAuthFSM::RtsMapToUserCodeBakup(const char* pRtsCode, DWORD dwDefaultUserCode)
-{
-	CSmartPointer<IConfigInfo> pConfig;
-	m_pEntity->GetFunction()->OpenConfig(Config_Software, pConfig);
-	int tmpUserCode = 0;
-	pConfig->ReadConfigValueInt("RtsToUserCode", pRtsCode, tmpUserCode);
-	if (tmpUserCode > 0)
-		return tmpUserCode;
-	else
-		return dwDefaultUserCode;
-}
-
-int CAccessAuthFSM::RtsMapToUserCode(const char* pRtsCode, DWORD dwDefaultUserCode)
-{
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("RtsCode:%s", pRtsCode);
-	CSmartPointer<IConfigInfo> pConfig;
-	m_pEntity->GetFunction()->OpenConfig(Config_CenterSetting, pConfig);
-	int tmpUserCode = 0;
-	pConfig->ReadConfigValueInt("RtsToUserCode", pRtsCode, tmpUserCode);
-	if (tmpUserCode > 0) 
-	{
-		return tmpUserCode;
-	} 
-	else 
-	{
-		std::map<std::string, DWORD> RtsToUserCode;
-		RtsToUserCode["RTS1705"] = 0x5029000e;
-		RtsToUserCode["RTS1707"] = 0x50290019;
-		RtsToUserCode["RTS1711"] = 0x5029000b;
-		RtsToUserCode["RTS1712"] = 0x50290018;
-		RtsToUserCode["RTS1713"] = 0x50290019;
-		RtsToUserCode["RTS1714"] = 0x5029000a;
-		RtsToUserCode["RTS1715"] = 0x5029000f;
-
-		if (RtsToUserCode.find(pRtsCode) != RtsToUserCode.end()) {
-			return RtsToUserCode[pRtsCode];
-		} 
-		else 
-		{
-			return dwDefaultUserCode;
-		}
-	}
-}
-
 DWORD CAccessAuthFSM::HandleTimeSyn(long nTimeDiff, BYTE* nSessionKey)
 {
 	// 比较终端和服务器时间, 时差小于3分钟(默认,可通过集中配置配置)不纠正	

+ 0 - 2
Module/mod_accessauth/AccessAuthFSM.h

@@ -474,8 +474,6 @@ public:
 	//oilyang@20210813 add bNeedEvent.
 	//no need to throw event defaultly except the KEY error to call for Close Page
 	void doWarnMsg(int errReason, std::string errMsg, bool bNeedEvent = false, string varMsg = "");
-	int RtsMapToUserCode(const char* pRtsCode, DWORD dwDefaultUserCode = ERR_ACCESSAUTH_UNKOWN);
-	int RtsMapToUserCodeBakup(const char* pRtsCode, DWORD dwDefaultUserCode = ERR_ACCESSAUTH_UNKOWN);
 	DWORD HandleTimeSyn(long nTimeDiff, BYTE* nSessionKey);
 	DWORD HandleGetToken(BYTE* token, BYTE* sharedKey, BYTE* token2, BYTE* retHash);
 	DWORD GetEncTerminalInfo(CBlob& encInfo);

+ 1 - 50
Module/mod_accessauth/mod_AccessAuth.h

@@ -55,56 +55,7 @@ public:
 
 	virtual void OnPrePause(CSmartPointer<ITransactionContext> pTransactionContext)
 	{
-		LOG_FUNCTION();
-
-		ErrorCodeEnum result(Error_DataCheck);
-		do
-		{
-			if (m_FSM.RtsMapToUserCode("RTS1705", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1705", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1707", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1707", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1711", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1711", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1712", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1712", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1713", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1713", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1714", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1714", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1715", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1715", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1716", 0) != m_FSM.RtsMapToUserCodeBakup("RTS1716", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1717", 1) == m_FSM.RtsMapToUserCodeBakup("RTS1717", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-			if (m_FSM.RtsMapToUserCode("RTS1715", 0) == m_FSM.RtsMapToUserCodeBakup("RTS1707", 0)) {
-				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("%d", __LINE__);
-				break;
-			}
-
-			result = Error_Succeed;
-
-		} while (false);
-
+		ErrorCodeEnum result(Error_Succeed);
 		pTransactionContext->SendAnswer(result);
 	}