|
@@ -4,6 +4,7 @@
|
|
|
#include "Event.h"
|
|
|
#include "access_basefun.h"
|
|
|
#include "SpUtility.h"
|
|
|
+#include <map>
|
|
|
#ifdef RVC_OS_WIN
|
|
|
#include <io.h>
|
|
|
#endif
|
|
@@ -1351,6 +1352,7 @@ unsigned int CAccessAuthFSM::s2_on_event(FSMEvent* pEvent)
|
|
|
CSimpleStringA strWKSyncSuccTime = "";
|
|
|
CSimpleStringA strWKSyncFailCount = "";
|
|
|
// 检查上次密钥同步时间(一天只同步一次)
|
|
|
+
|
|
|
CSmartPointer<IConfigInfo> pConfigRun;
|
|
|
m_pEntity->GetFunction()->OpenConfig(Config_Run, pConfigRun);
|
|
|
pConfigRun->ReadConfigValueInt("Main", "WKSyncSuccTime", nWKLastSyncTime);
|
|
@@ -1882,11 +1884,27 @@ int CAccessAuthFSM::RtsMapToUserCode(const char* pRtsCode, DWORD dwDefaultUserCo
|
|
|
LOG_FUNCTION();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("RtsCode:%s",pRtsCode);
|
|
|
CSmartPointer<IConfigInfo> pConfig;
|
|
|
- m_pEntity->GetFunction()->OpenConfig(Config_Software, pConfig);
|
|
|
+ m_pEntity->GetFunction()->OpenConfig(Config_CenterSetting, pConfig);
|
|
|
int tmpUserCode = 0;
|
|
|
pConfig->ReadConfigValueInt("RtsToUserCode", pRtsCode, tmpUserCode);
|
|
|
- if (tmpUserCode > 0)
|
|
|
- return tmpUserCode;
|
|
|
- else
|
|
|
- return dwDefaultUserCode;
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|