123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- #include "stdafx.h"
- #include "AccessAuthFSM.h"
- #include "mod_AccessAuth.h"
- #include "Event.h"
- #include <io.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "MD5file.h"
- CAccessAuthFSM::CAccessAuthFSM()
- :m_pConnection(NULL)
- {
- }
- CAccessAuthFSM::~CAccessAuthFSM()
- {
- m_iState = FSM_STATE_EXIT; // 屏蔽退出ASSERT错误
- }
- void CAccessAuthFSM::OnStateTrans(int iSrcState, int iDstState)
- {
- Dbg("trans from %s to %s", GetStateName(iSrcState), GetStateName(iDstState));
- }
- // 初始化PinPad及KMC
- ErrorCodeEnum CAccessAuthFSM::OnInit()
- {
- LOG_FUNCTION();
- AddStateHooker(this);
- m_finishAccess = 0;
- //设置初始锁定状态,0
- CSmartPointer<IEntityFunction> spFunction = m_pEntity->GetFunction();
- spFunction->SetSysVar("LockState", "0", true);
-
- ErrorCodeEnum Error = LoadCenterConfig();
- if (Error != Error_Succeed)
- {
- LOG_TRACE("load CenterSetting.ini failed!");
- }
- return Error_Succeed;
- }
- ErrorCodeEnum CAccessAuthFSM::OnExit()
- {
- RemoveStateHooker(this);
- return Error_Succeed;
- }
- void CAccessAuthFSM::s1_on_entry()
- {
- SetSysVar("I");
- }
- void CAccessAuthFSM::s1_on_exit()
- {
- }
- unsigned int CAccessAuthFSM::s1_on_event(FSMEvent* pEvent)
- {
- LOG_FUNCTION();
- Dbg("s1_on_event: %d", pEvent->iEvt);
- if (pEvent->iEvt == Event_ReportStage)
- {
- // 上报状态
- if (SecureClientConnect() == Error_Succeed)
- {
- ReportStateEvent *pReportEvent = (ReportStateEvent*)pEvent;
- m_pConnection->SendTerminalStagePackage(pReportEvent->cNewStage, pReportEvent->dwNewStageTime,
- pReportEvent->cOldStage, pReportEvent->dwOldStageTime);
- }
- }
- return 0;
- }
- ErrorCodeEnum CAccessAuthFSM::SecureClientConnect()
- {
- if (m_pConnection != NULL && m_pConnection->IsConnectionOK())
- return Error_Succeed;
- SecureClientRelease();
- m_pConnection = new CAccessAuthConn(m_pEntity, this);
- if (m_pConnection->ConnectFromCentralSetting() && m_pConnection->IsConnectionOK())
- return Error_Succeed;
- SecureClientRelease();
- return Error_PeerReject;
- }
- ErrorCodeEnum CAccessAuthFSM::SecureClientRelease()
- {
- if (m_pConnection != NULL)
- {
- m_pConnection->Close();
- m_pConnection->DecRefCount();
- m_pConnection = NULL;
- }
- return Error_Succeed;
- }
- std::_Mutex mut;
- struct TimeOutTask : public ITaskSp {
- CAccessAuthFSM* m_fsm;
- long m_timeOut;//毫秒级
- TimeOutTask(CAccessAuthFSM* fsm,long timeOut) :m_fsm(fsm),m_timeOut(timeOut) {}
- void Process()
- {
- Sleep(m_timeOut);
- MyMutex myMut(&mut);
- if (!m_fsm->m_finishAccess) {
- Dbg("准入超时[%d]",m_fsm->m_finishAccess);
- m_fsm->PostEventFIFO(new FSMEvent(m_fsm->Event_ReqTokenCancel));
- m_fsm->m_finishAccess = 1;
- }
- }
- };
- void CAccessAuthFSM::s2_on_entry()
- {
- LOG_FUNCTION();
- // [6/16/2020 9:51 @Gifur]
- //ScheduleTimer(2, 120 * 1000); // 设定30秒准入超时
- m_finishAccess = 0;
- TimeOutTask* timeOutTask = new TimeOutTask(this,120 * 1000);// 设定30秒准入超时
- GetEntityBase()->GetFunction()->PostThreadPoolTask(timeOutTask);
- Dbg("启动了准入超时定时器2分钟[%d]",m_finishAccess);
- auto pEntity = (CAccessAuthEntity*)m_pEntity;
-
- auto rc = pEntity->InitKMC();
- if (rc != Error_Succeed)
- {
- FSMEvent *pEvent = new FSMEvent(Event_UpdateWKFail);
- PostEventFIFO(pEvent);
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_INIT_KMC,
- GetOutPutStr("%s%08X", "InitKMC", rc).c_str());
- return;
- }
-
- SetSysVar("C");
- if ((rc = SecureClientConnect()) != Error_Succeed)
- {
- // 启动定时器尝试重试
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_CONNECT_SERVER,
- GetOutPutStr("%s%08X", "SecureClientConnect", rc).c_str());
- ScheduleTimer(1, 8000);
- return;
- }
- PostEventFIFO(new FSMEvent(Event_ConnectionOK));
- }
- void CAccessAuthFSM::s2_on_exit()
- {
- // 关闭连接
- auto pEntity = (CAccessAuthEntity*)m_pEntity;
- pEntity->ReleaseKMC();
- SecureClientRelease();
- CancelTimer(1);
-
- //CancelTimer(2);
- }
- // 会收到Event_UpdateWKResult和Event_ReqTokenResult和EVT_TIMER
- unsigned int CAccessAuthFSM::s2_on_event(FSMEvent* pEvent)
- {
- if (pEvent->iEvt == EVT_TIMER)
- {
- if (pEvent->param1 == 2) // access timeout
- {
- // 重试超时
- Dbg("access authorize timeout");
- PostEventFIFO(new FSMEvent(Event_ReqTokenCancel));
- }
- else if (pEvent->param1 == 1 || pEvent->param1 == 3) // reconnect
- {
- auto rc = SecureClientConnect();
- if (rc != Error_Succeed)
- {
- // 启动定时器尝试重试
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_CONNECT_SERVER,
- GetOutPutStr("%s%08X","SecureClientConnect",rc).c_str());
- ScheduleTimer(1, 8000);
- return 1;
- }
- PostEventFIFO(new FSMEvent(Event_ConnectionOK));
- return 0;
- }
- }
- else if (pEvent->iEvt == Event_ConnectionOK)
- {
- auto pEntity = ((CAccessAuthEntity*)m_pEntity);
- int isFirstAccessAfterSM = pEntity->GetOrSetIsFirstSM(0);
- if (isFirstAccessAfterSM != 1) {
- FSMEvent* pEvent = new FSMEvent(Event_CheckMD5Succ);
- PostEventFIFO(pEvent);
- return 0;
- }
- CSimpleStringA strInitState;
- pEntity->GetFunction()->GetSysVar("InitState", strInitState);
- if (strInitState == "1") {
- //2020/5/29 删除了各个文件MD5检验的代码
- FSMEvent* pEvent = new FSMEvent(Event_CheckMD5Succ);
- PostEventFIFO(pEvent);
- }
- else {
- ScheduleTimer(3, 1500);
- }
- }
- else if (pEvent->iEvt == Event_CheckMD5Fail)
- {
- // 上报状态
- m_pConnection->SendReportStatePackage("CheckMD5", Error_Unexpect, ((CAccessAuthEntity*)m_pEntity)->GetAuthErrMsg());
- return 0;
- }
- else if (pEvent->iEvt == Event_CheckMD5Succ)
- {
- // 同步服务器时间
- DWORD rc = m_pConnection->SendSyncTimePackage();
- if (rc != Error_Succeed)
- {
- FSMEvent *pEvent = new FSMEvent(Event_EndSyncTime);
- PostEventFIFO(pEvent);
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_SYNC_TIME,
- GetOutPutStr("%s%08X", "SendSyncTimePackage", rc).c_str());
- }
- //获取终端锁定状态
- rc = m_pConnection->SendLockStatePackage();
- if (rc != Error_Succeed)
- {
- LogWarn(Severity_Middle, Error_Unexpect, rc,
- GetOutPutStr("%s%08X", "SendLockStatePackage", rc).c_str());
- }
- }
- else if (pEvent->iEvt == Event_EndSyncTime)
- {
- auto pEntity = ((CAccessAuthEntity*)m_pEntity);
- if (!pEntity->HasPinPad())
- {
- // 没有密码键盘,直接准入
- Dbg("has no pinpad, ignore update wk");
- PostEventFIFO(new FSMEvent(CAccessAuthFSM::Event_IgnoreUpdateWK));
- return 0;
- }
- // 检查上次密钥同步时间(一天只同步一次)
- //CSmartPointer<IConfigInfo> pConfig;
- //m_pEntity->GetFunction()->OpenConfig(Config_Software, pConfig);
- int nWKLastSyncTime(0);
- //pConfig->ReadConfigValueInt("Main", "WKSyncSuccTime", nWKLastSyncTime);
- int nWKSyncFailCount(0);
- //pConfig->ReadConfigValueInt("Main", "WKSyncFailCount", nWKSyncFailCount);
- CSimpleStringA strWKSyncSuccTime = "";
- CSimpleStringA strWKSyncFailCount = "";
- auto rc = pEntity->GetFunction()->GetSysVar("WKSyncSuccTime", strWKSyncSuccTime);
- assert(rc == Error_Succeed);
- nWKLastSyncTime = atoi(strWKSyncSuccTime);
- rc = pEntity->GetFunction()->GetSysVar("WKSyncFailCount", strWKSyncFailCount);
- assert(rc == Error_Succeed);
- nWKSyncFailCount = atoi(strWKSyncFailCount);
- SYSTEMTIME stSyncTime = CSmallDateTime(nWKLastSyncTime).ToSystemTime();
- Dbg("last WK sync time: %04d-%02d-%02d %02d:%02d:%02d",
- stSyncTime.wYear, stSyncTime.wMonth, stSyncTime.wDay,
- stSyncTime.wHour, stSyncTime.wMinute, stSyncTime.wSecond);
- SYSTEMTIME stNow = {};
- GetLocalTime(&stNow);
- if (nWKLastSyncTime > 0 && stSyncTime.wYear == stNow.wYear
- && stSyncTime.wMonth == stNow.wMonth && stSyncTime.wDay == stNow.wDay
- && nWKSyncFailCount == 0 ) // 最近一次同步成功,才能跳过
- {
- Dbg("WK has been updated today, last sync time: %s", (const char*)CSmallDateTime(nWKLastSyncTime).ToTimeString());
- FSMEvent *pEvent = new FSMEvent(Event_IgnoreUpdateWK);
- PostEventFIFO(pEvent);
- }
- else
- {
- Dbg("begin update WK now");
-
- // 请求WK
- DWORD rc = m_pConnection->SendWKUpdatePackage();
- if (rc != Error_Succeed)
- {
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_UPDATE_WK,
- GetOutPutStr("%s%08X", "SendWKUpdatePackage", rc).c_str());
- FSMEvent *pEvent = new FSMEvent(Event_UpdateWKFail);
- PostEventFIFO(pEvent);
- }
- }
- return 0;
- }
- else if (pEvent->iEvt == Event_UpdateWKSucc)
- {
- // 上报状态
- m_pConnection->SendReportStatePackage("UpdateWK", Error_Succeed, "更新工作密钥成功");
- // 保存WK同步时间
- //CSmartPointer<IConfigInfo> pConfig;
- //m_pEntity->GetFunction()->OpenConfig(Config_Software, pConfig);
- DWORD rc = m_pEntity->GetFunction()->SetSysVar("WKSyncSuccTime", (const char*) CSimpleStringA::Format("0x%08X", (DWORD)CSmallDateTime::GetNow()), true);
- assert(rc == Error_Succeed);
- /*pConfig->WriteConfigValue("Main", "WKSyncSuccTime",
- (const char*) CSimpleStringA::Format("0x%08X", (DWORD)CSmallDateTime::GetNow()));*/
- // 重置失败次数
- //pConfig->WriteConfigValueInt("Main", "WKSyncFailCount", 0);
- rc = m_pEntity->GetFunction()->SetSysVar("WKSyncFailCount", "0", true);
- assert(rc == Error_Succeed);
- // 请求Token
- Dbg("begin get token now");
- rc = SecureClientConnect();
- if (rc == Error_Succeed)
- rc = m_pConnection->SendGetTokenPackage();
-
- if (rc != Error_Succeed)
- {
- FSMEvent *pEvent = new FSMEvent(Event_ReqTokenFail);
- PostEventFIFO(pEvent);
- }
- return 0;
- }
- else if (pEvent->iEvt == Event_IgnoreUpdateWK)
- {
- // 忽略同步WK,直接准入
- Dbg("ignore update wk, get token now");
- DWORD rc = SecureClientConnect();
- if (rc == Error_Succeed)
- rc = m_pConnection->SendGetTokenPackage();
-
- if (rc != Error_Succeed)
- {
- FSMEvent *pEvent = new FSMEvent(Event_ReqTokenFail);
- PostEventFIFO(pEvent);
- }
- }
- else if (pEvent->iEvt == Event_UpdateWKFail)
- {
- Dbg("update pinpad WK fail");
- // 上报状态
- m_pConnection->SendReportStatePackage("UpdateWK", Error_Unexpect, ((CAccessAuthEntity*)m_pEntity)->GetAuthErrMsg());
-
- // WK失败,累加失败次数,一天内失败3次以上,不再同步WK,直接请求Token
- /*CSmartPointer<IConfigInfo> pConfig;
- m_pEntity->GetFunction()->OpenConfig(Config_Software, pConfig);
- int nWKSyncFailCount(0);
- pConfig->ReadConfigValueInt("Main", "WKSyncFailCount", nWKSyncFailCount);
- pConfig->WriteConfigValueInt("Main", "WKSyncFailCount", ++nWKSyncFailCount);*/
- // zl@20190624 WKSyncFailCount迁移到系统变量
- CSimpleStringA strWKSyncFailCount = "";
- auto rc = m_pEntity->GetFunction()->GetSysVar("WKSyncFailCount", strWKSyncFailCount);
- assert(rc == Error_Succeed);
- int nWKSyncFailCount = atoi(strWKSyncFailCount);
- nWKSyncFailCount++;
- rc = m_pEntity->GetFunction()->SetSysVar("WKSyncFailCount", CSimpleStringA::Format("%d", nWKSyncFailCount), true);
- assert(rc == Error_Succeed);
- // xkm@20150702 启用新准入方案,密钥同步失败不得准入
- // xkm@20151116 失败3次以上应直接跳过同步,避免KMC故障时影响可视柜台准入
- // xkm@20161220 更新密钥失败直接准入
- //if (nWKSyncFailCount >= 3)
- {
- //Dbg("update WK fail more than 3 times, ignore it");
- PostEventFIFO(new FSMEvent(CAccessAuthFSM::Event_IgnoreUpdateWK));
- }
- //else
- //{
- // PostEventFIFO(new FSMEvent(CAccessAuthFSM::Event_ReqTokenFail));
- //}
- }
- else if (pEvent->iEvt == Event_ReqTokenFail)
- {
- do {
- MyMutex myMut(&mut);
- if (m_finishAccess) return 0;
- m_finishAccess = 1;
- auto pEntity = (CAccessAuthEntity*)m_pEntity;
- CSimpleStringA strErrMsg = CSimpleStringA::Format("准入失败(%d)", m_finishAccess);
- pEntity->GetFunction()->ShowFatalError(strErrMsg);
- } while (0);
- // 上报状态
- m_pConnection->SendReportStatePackage("AccessAuth", Error_Unexpect, ((CAccessAuthEntity*)m_pEntity)->GetAuthErrMsg());
- //// 如果准入失败,表示前后台密钥可能不同步,需累加WKSyncFailCount
- //CSmartPointer<IConfigInfo> pConfig;
- //m_pEntity->GetFunction()->OpenConfig(Config_Software, pConfig);
- //int nWKSyncFailCount(0);
- //pConfig->ReadConfigValueInt("Main", "WKSyncFailCount", nWKSyncFailCount);
- //if (nWKSyncFailCount == 0)
- // pConfig->WriteConfigValueInt("Main", "WKSyncFailCount", ++nWKSyncFailCount);
- return 0;
- }
- else if (pEvent->iEvt == Event_ReqTokenCancel)
- {
- auto pEntity = (CAccessAuthEntity*)m_pEntity;
- CSimpleStringA strErrMsg = CSimpleStringA::Format("准入超时(%d)", m_finishAccess);
- pEntity->GetFunction()->ShowFatalError(strErrMsg);
- // 上报状态
- if (m_pConnection != NULL && m_pConnection->IsConnectionOK())
- {
- m_pConnection->SendReportStatePackage("AccessAuth", Error_TimeOut, "准入超时");
- }
- return 0;
- }
- else if (pEvent->iEvt == Event_ReqTokenSucc)
- {
- do {
- MyMutex myMut(&mut);
- if (m_finishAccess) return 0;
- m_finishAccess = 1;
- } while (0);
- // 上报状态
- m_pConnection->SendReportStatePackage("AccessAuth", Error_Succeed, "准入成功");
- return 0;
- }
- return 0;
- }
- void CAccessAuthFSM::s3_on_entry()
- {
- SetSysVar("F");
- auto pEntity = (CAccessAuthEntity*)m_pEntity;
- CSimpleStringA strErrMsg = CSimpleStringA::Format("准入失败(%s)", (const char*)pEntity->GetAuthErrMsg());
-
- // 发送准入失败事件
- //LogError(Severity_Middle, Error_Unexpect, EVENT_ACCESSAUTH_FAILED, strErrMsg);
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_FAILED,
- GetOutPutStr("%s%s","准入", (const char*)pEntity->GetAuthErrMsg()).c_str());
- pEntity->GetFunction()->ShowFatalError(strErrMsg);
- }
- void CAccessAuthFSM::s3_on_exit()
- {
- }
- unsigned int CAccessAuthFSM::s3_on_event(FSMEvent* event)
- {
- return 0;
- }
- void CAccessAuthFSM::s4_on_entry()
- {
- SetSysVar("A");
- // 发送准入超时事件
- LogWarn(Severity_Middle, Error_Unexpect, ERR_ACCESSAUTH_TIMEOUT,
- GetOutPutStr("%s%s", "准入", "超时").c_str());
- // 切换到s1
- PostEventFIFO(new FSMEvent(Event_StateTimeout));
- }
- void CAccessAuthFSM::s4_on_exit()
- {
- }
- unsigned int CAccessAuthFSM::s4_on_event(FSMEvent* event)
- {
- return 0;
- }
- void CAccessAuthFSM::s5_on_entry()
- {
- SetSysVar("L");
- LogEvent(Severity_Middle, EVENT_ACCESSAUTH_SUCCEED, "终端准入成功");
- m_pEntity->GetFunction()->ShowStartupInfo("准入成功");
- }
- void CAccessAuthFSM::s5_on_exit()
- {
- }
- unsigned int CAccessAuthFSM::s5_on_event(FSMEvent* pEvent)
- {
- if (pEvent->iEvt == Event_StartUnregist)
- {
- // 取出参数先保存
- m_nExitReason = pEvent->param1;
- m_nExitWay = pEvent->param2;
- }
- else if (pEvent->iEvt == Event_ReportStage)
- {
- // 上报状态
- if (SecureClientConnect() == Error_Succeed)
- {
- ReportStateEvent *pReportEvent = (ReportStateEvent*)pEvent;
- m_pConnection->SendTerminalStagePackage(pReportEvent->cNewStage, pReportEvent->dwNewStageTime,
- pReportEvent->cOldStage, pReportEvent->dwOldStageTime);
- }
- }
- return 0;
- }
- void CAccessAuthFSM::s6_on_entry()
- {
- SetSysVar("E");
- if (SecureClientConnect() != Error_Succeed)
- {
- // 启动定时器尝试重试
- Dbg("connect to AccessAuthorization service fail, start timer(30s) to retry");
- ScheduleTimer(2, 30000);
- return;
- }
- PostEventFIFO(new FSMEvent(Event_ConnectionOK));
- }
- void CAccessAuthFSM::s6_on_exit()
- {
- CancelTimer(2);
- }
- unsigned int CAccessAuthFSM::s6_on_event(FSMEvent* pEvent)
- {
- if (pEvent->iEvt == EVT_TIMER)
- {
- if (SecureClientConnect() != Error_Succeed)
- {
- // 启动定时器尝试重试
- Dbg("connect to AccessAuthorization service fail, start timer to retry");
- ScheduleTimer(2, 30000);
- return 1;
- }
- PostEventFIFO(new FSMEvent(Event_ConnectionOK));
- }
- else if (pEvent->iEvt == Event_ConnectionOK)
- {
- // 请求退出
- DWORD rc = m_pConnection->SendExitNoticePackage(m_nExitReason, m_nExitWay);
- // 切换到s1
- PostEventFIFO(new FSMEvent(Event_StateTimeout));
- }
- return 0;
- }
- void CAccessAuthFSM::s7_on_entry()
- {
- SetSysVar("T");
- // 过渡状态,立刻转入孤立状态
- PostEventFIFO(new FSMEvent(Event_StateTimeout));
- }
- void CAccessAuthFSM::s7_on_exit()
- {
- }
- unsigned int CAccessAuthFSM::s7_on_event(FSMEvent* event)
- {
- return 0;
- }
- ErrorCodeEnum CAccessAuthFSM::SetSysVar(const CSimpleStringA &newVal)
- {
- CSmartPointer<IEntityFunction> spFunction = m_pEntity->GetFunction();
- return spFunction->SetSysVar("EntryPermit", (const char*)newVal);
- }
- DWORD CAccessAuthFSM::InitDevice(SpReqAnsContext<AccessAuthService_InitDev_Req, AccessAuthService_InitDev_Ans>::Pointer &ctx)
- {
- DWORD rc = SecureClientConnect();
- if (rc == Error_Succeed)
- rc = m_pConnection->SendInitDevicePackage(ctx);
- else
- Dbg("secure connect fail");
- if (rc != Error_Succeed)
- {
- ctx->Answer(rc? Error_Unexpect: Error_Succeed);
- return rc;
- }
- return Error_Succeed;
- }
- DWORD CAccessAuthFSM::SyncTime()
- {
- auto rc = SecureClientConnect();
- if (rc == Error_Succeed)
- {
- return m_pConnection->SendSyncTimePackageNew();
- }
- else
- {
- Dbg("secure connect fail");
- return rc;
- }
- }
- ErrorCodeEnum CAccessAuthFSM::LoadCenterConfig()
- {
- CSmartPointer<IEntityFunction> spFunction = m_pEntity->GetFunction();
- CSmartPointer<IConfigInfo> spConfig;
- ErrorCodeEnum Error = spFunction->OpenConfig(Config_CenterSetting, spConfig);
- if (Error_Succeed == Error)
- {
- Error = spConfig->ReadConfigValueInt("AccessAuthorization", "CheckMD5", m_nCheckMD5);
- if (Error_Succeed == Error)
- {
- Dbg("get CheckMD5=%d from CenterSetting.ini", m_nCheckMD5);
- }
- else
- {
- Dbg("get CheckMD5 from CenterSetting.ini failed");
- }
- }
- return Error;
- }
|