浏览代码

Z991239-4964 #comment 自检取实体列表从集中配置取;VtmLoader等待健康启动200s

oilyang 1 年之前
父节点
当前提交
dcc591491b

+ 14 - 0
Module/mod_healthmanager/HealthManagerFSM.cpp

@@ -1329,6 +1329,20 @@ int CHealthManagerFSM::WaitDeamonFinish()
 int CHealthManagerFSM::AccessAuthDoWork()
 {
 	LOG_FUNCTION();
+	//to check if PinPad is ok, wait for 5 seconds,then go on
+	//RVC.CardStore have no PinPad
+	int waitCount = 0;
+	while (waitCount < 5)
+	{
+		if (m_bPinPadOpenSuc || m_sysInfo.strMachineType.Compare("RVC.CardStore",true) == 0)
+			break;
+		else
+		{
+			Sleep(1000);
+			waitCount++;
+		}
+	}
+
 	m_bInAccessAuthDoWork = true;
 	CSimpleStringA csTermStage("");
 	ErrorCodeEnum eErr;

+ 4 - 3
Module/mod_healthmanager/HealthManagerFSM.h

@@ -242,7 +242,7 @@ public:
 	, m_checkCode(""), m_accessAuthCheckMD5(0), m_havReceiveMD5OK(0), m_bFirstAccessAuth(true)
 	, m_bIEBeforeHealth(false), m_hasCfgGpioInRootIni(false), m_csErrEntity(""), m_bInAccessAuthDoWork(false)
 	, m_bEntityNewStart(true), m_autoDoInitCount(0), m_bDoingAutoInit(false), m_iDoNotUpdateWKDaily(0)
-	, m_wkUpdatePeriod(1), mCofigMode(false){}
+	, m_wkUpdatePeriod(1), mCofigMode(false), m_bPinPadOpenSuc(false){}
 	~CHealthManagerFSM(){}
 	virtual ErrorCodeEnum OnInit();
 	virtual ErrorCodeEnum OnExit();
@@ -344,6 +344,7 @@ public:
 
 	CSimpleStringA GetAuthErrMsg();
 	void QueryHardwareInfo(SpReqAnsContext<HealthManagerService_QueryHardwareInfo_Req, HealthManagerService_QueryHardwareInfo_Ans>::Pointer ctx);
+	void SetPinPadOpenSuc() { m_bPinPadOpenSuc = true; }
 
 private:
 	
@@ -376,8 +377,8 @@ private:
 		,m_havReceiveMD5OK,m_autoDoInitCount, m_sleepEnterOpMS/*启动第三阶段等待时间,单位毫秒*/, m_sleepColdBootMS/*冷启动等待时间,单位毫秒*/
 		,m_iAccessAuth/*-1 未准入; 0 准入失败;1 准入成功*/, m_iDoNotUpdateWKDaily, m_wkUpdatePeriod;
 	AccessAuthService_ClientBase *m_pACClient;
-	bool m_bInitSuc,m_bInitFail,m_bIdleToMaintain,m_bHasAuthEver,m_bFirstAccessAuth
-		,m_bIEBeforeHealth, m_hasCfgGpioInRootIni,m_bInAccessAuthDoWork,m_bEntityNewStart,m_bDoingAutoInit;
+	bool m_bInitSuc, m_bInitFail, m_bIdleToMaintain, m_bHasAuthEver, m_bFirstAccessAuth
+		, m_bIEBeforeHealth, m_hasCfgGpioInRootIni, m_bInAccessAuthDoWork, m_bEntityNewStart, m_bDoingAutoInit, m_bPinPadOpenSuc;
 	DWORD m_AccessAuthTimeout,m_InitializationTimeout,m_elapseTimeFromOSStart;
 	ULONGLONG m_ullElapseFromOSStart;
 	DeviceControlService_ClientBase *m_pDevCtrlClient;

+ 2 - 0
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -1832,6 +1832,8 @@ void CHealthManagerEntity::OnLog(const CAutoArray<CUUID>& SubIDs, const CUUID nL
 	}
 	break;
 	case LOG_EVT_PINPAD_OPEN_SUC:
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("PinPad open suc.");
+		m_fsm.SetPinPadOpenSuc();
 		m_fsm.JudgeIfNeedInitFWB();
 		break;
 	case EVENT_MOD_CENTERSETTING_CRITICAL_UPDATE:

+ 41 - 112
Module/mod_selfchecker/SelfCheckerFSM.cpp

@@ -1,5 +1,6 @@
 #include "stdafx.h"
 #define WIN32_LEAN_AND_MEAN
+#include <algorithm>
 #include "SelfCheckerFSM.h"
 #include "EventCode.h"
 #pragma comment(lib,"user32.lib")
@@ -107,7 +108,6 @@ void CSelfCheckerFSM::s0_on_entry()
 			|| tmpNames[i] == "Download" || tmpNames[i] == "UpgradeRun" || tmpNames[i] == "UpgradeManager")
 		{
 			m_allEntity.push_back(tmpNames[i]);
-			m_activeEntity.push_back(tmpNames[i]);
 		}
 	}
 	FSMEvent* pEvt = new FSMEvent(USER_EVT_INIT);
@@ -278,6 +278,8 @@ ErrorCodeEnum CSelfCheckerFSM::Initial()
 		spConfigRun->ReadConfigValueInt("WarnRecord", "disk", m_diskLastWarnHour);
 	}
 
+	m_activeEntity.push_back("Chromium");
+
 	return Error_Succeed;
 }
 ErrorCodeEnum CSelfCheckerFSM::ExceptionErrorProcess(const char* pszEntityName, ErrorCodeEnum eCode)
@@ -472,7 +474,7 @@ ErrorCodeEnum CSelfCheckerFSM::CheckEntity(const char* pszEntityName, EntityTest
 			//the hardward entity and some other entity no need to test
 			if (_strnicmp("PinPad", pszEntityName, strlen("PinPad")) == 0 || _strnicmp("CardIssuer", pszEntityName, strlen("CardIssuer")) == 0
 				|| _strnicmp("CardSwiper", pszEntityName, strlen("CardSwiper")) == 0 || _strnicmp("ContactlessCard", pszEntityName, strlen("ContactlessCard")) == 0
-				|| _strnicmp("IDCertificate", pszEntityName, strlen("IDCertificate")) == 0 || _strnicmp("ups", pszEntityName, strlen("ups")) == 0
+				|| _strnicmp("IDCertificate", pszEntityName, strlen("IDCertificate")) == 0
 				|| _strnicmp("gpio", pszEntityName, strlen("gpio")) == 0 || _strnicmp("HSPScanner", pszEntityName, strlen("HSPScanner")) == 0
 				|| _strnicmp("FingerPrint", pszEntityName, strlen("FingerPrint")) == 0
 				)
@@ -480,7 +482,9 @@ ErrorCodeEnum CSelfCheckerFSM::CheckEntity(const char* pszEntityName, EntityTest
 		}
 	}
 	//oilyang@20170926 no need to check by self.Let the HealthManager entity to do it.
-	if (pszEntityName != NULL && strnicmp(pszEntityName, GetEntityBase()->GetEntityName(), strlen(GetEntityBase()->GetEntityName())) == 0)
+	//oilyang@20231106 no need to check VtmLoader
+	if (pszEntityName != NULL && (strnicmp(pszEntityName, GetEntityBase()->GetEntityName(), strlen(GetEntityBase()->GetEntityName())) == 0
+		|| strnicmp(pszEntityName, "VtmLoader", strlen("VtmLoader")) == 0))
 		return Error_Succeed;
 	CSmartPointer<IEntityFunction> pFunc = GetEntityBase()->GetFunction();
 	CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
@@ -536,60 +540,9 @@ void CSelfCheckerFSM::OnNormalWorkTimerout(void* pData)
 
 void CSelfCheckerFSM::DoOnCreated(const char* pszEntityName, ErrorCodeEnum eOnStartErrorCode, const char* pszCallerEntity)
 {
-	if (eOnStartErrorCode == Error_Succeed)
-	{
-		vector<CSimpleStringA>::iterator it, itAct;
-		bool bFound = false, bActFound = false;
-
-		for (it = m_allEntity.begin(); it != m_allEntity.end(); ++it)
-		{
-			if (!strncmp(pszEntityName, *it, it->GetLength()))
-			{
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("already exist %s", pszEntityName);
-				bFound = true;
-				break;
-			}
-		}
-		if (!bFound)
-			m_allEntity.push_back(pszEntityName);
-
-		for (itAct = m_activeEntity.begin(); itAct != m_activeEntity.end(); ++itAct)
-		{
-			if (!strncmp(pszEntityName, *itAct, itAct->GetLength()))
-			{
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("active entity already exist %s", pszEntityName);
-				bActFound = true;
-				break;
-			}
-		}
-		if (!bActFound)
-		{
-			m_activeEntity.push_back(pszEntityName);
-		}
-		m_entCfgInfo[pszEntityName].entityRestartCount = 0;
-	}
 }
 void CSelfCheckerFSM::DoOnClosed(const char* pszEntityName, EntityCloseCauseEnum eCloseCause, ErrorCodeEnum eOnCloseErrorCode, const char* pszCallerEntity)
 {
-	//not close by selfchecker
-	if (strncmp(pszCallerEntity, GetEntityBase()->GetEntityName(), strlen(pszCallerEntity)))
-	{
-		if (eCloseCause == CloseCause_Self || eCloseCause == CloseCause_Other)
-		{
-			vector<CSimpleStringA>::iterator it;
-			for (it = m_activeEntity.begin(); it != m_activeEntity.end(); ++it)
-			{
-				if (!strncmp(pszEntityName, *it, it->GetLength()))
-				{
-					DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("onclosed %s", pszEntityName);
-					//oilyang@20210425 as almost all entity's start configure have been set to 0(can be ignored)
-					//no need to erase the m_activeEntity any more
-					//m_activeEntity.erase(it);
-					break;
-				}
-			}
-		}
-	}
 }
 void CSelfCheckerFSM::DoOnException(const char* pszEntityName, const char* pszFunctionName, EntityStateEnum eState, EntityStateEnum eLastState, ErrorCodeEnum eErrorCode)
 {
@@ -796,22 +749,6 @@ ErrorCodeEnum CSelfCheckerFSM::GetEntityErrorList(int& warmLevel, CSimpleStringA
 }
 int CSelfCheckerFSM::Proc(string entity, ProcType eType, DWORD dwCode, const char* pszMessage)
 {
-	ConnectToHealthManager();
-	if (!m_entRunInfo[entity.c_str()].bGetLoadOpt)
-	{
-		if (m_pHealthClient != NULL)
-		{
-			HealthManagerService_GetEntityCfgInfo_Req req;
-			HealthManagerService_GetEntityCfgInfo_Ans ans;
-			req.name = entity.c_str();
-			ErrorCodeEnum errCode = (*m_pHealthClient)(EntityResource::getLink().upgradeLink())->GetEntityCfgInfo(req, ans, 10000);
-			if (errCode == Error_Succeed)
-			{
-				m_entRunInfo[entity.c_str()].bGetLoadOpt = true;
-				SetEntityCfgInfo(entity.c_str(), ans.loadOpt);
-			}
-		}
-	}
 	map<string, EntityCfg, EntityNameCompare>::iterator it;
 	if ((it = m_mapEntity.find(entity.c_str())) == m_mapEntity.end())
 	{
@@ -1178,51 +1115,9 @@ void CSelfCheckerFSM::UpgradeActionProcess(const char* pszEntityName, const char
 {
 	return;
 }
-ErrorCodeEnum CSelfCheckerFSM::ConnectToHealthManager()
-{
-	if (m_pHealthClient == NULL || m_pHealthClient->QuerySessionClosed())
-	{
-		m_pHealthClient = new HealthManagerService_ClientBase(GetEntityBase());
-		ErrorCodeEnum ErrorConn = m_pHealthClient->Connect();
-		if (ErrorConn != Error_Succeed) {
-			m_pHealthClient->SafeDelete();
-			m_pHealthClient = NULL;
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Connect to Healthmanager failed.%d", ErrorConn);
-			return Error_Unexpect;
-		}
-		else
-		{
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("HealthManager connected.");
-		}
-	}
-	return Error_Succeed;
-}
 void CSelfCheckerFSM::SetEverEnterMainPageFlag(bool bValue)
 {
 	m_bEverInMainPage = bValue;
-	if (!m_bHaveGetEntityList)
-	{
-		ConnectToHealthManager();
-		if (m_pHealthClient != NULL)
-		{
-			HealthManagerService_GetEntityCfgInfo_Req req;
-			HealthManagerService_GetEntityCfgInfo_Ans ans;
-			req.name = "AllConfiguredEntity";
-			ErrorCodeEnum errCode = (*m_pHealthClient)(EntityResource::getLink().upgradeLink())->GetEntityCfgInfo(req, ans, 5000);
-			if (errCode == Error_Succeed)
-			{
-				m_bHaveGetEntityList = true;
-				CAutoArray<CSimpleStringA> allCfgEntity = ans.reserved2.Split(',');
-				m_activeEntity.clear();
-				for (int i = 0; i < allCfgEntity.GetCount(); i++)
-				{
-					if (allCfgEntity[i].Trim().GetLength() > 1)//except for empty entity name
-						m_activeEntity.push_back(allCfgEntity[i]);
-				}
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("to get all entity list:%s", ans.reserved2);
-			}
-		}
-	}
 }
 void CSelfCheckerFSM::AddFWBEntityToList()
 {
@@ -1261,4 +1156,38 @@ void CSelfCheckerFSM::AddFWBEntityToList()
 		m_activeEntity.push_back("IDCertificate");
 	if (!bActFingerPrintFound)
 		m_activeEntity.push_back("FingerPrint");
+}
+void CSelfCheckerFSM::GetEntityList(CSimpleStringA csList)
+{
+
+
+	CAutoArray<CSimpleStringA> arrStageList;
+	arrStageList.Init(64);
+	arrStageList = csList.Split('|');
+	for (int i = 0; i < arrStageList.GetCount(); ++i)
+	{
+		CAutoArray<CSimpleStringA> arrEntity;
+		arrEntity.Init(2);
+		arrEntity = arrStageList[i].Split('=');
+		if (arrEntity.GetCount() < 2)
+			break;
+		//去重,防止前面已经加载了
+		if (find(m_activeEntity.begin(), m_activeEntity.end(), arrEntity[0].GetData()) != m_activeEntity.end())
+			continue;
+		m_activeEntity.push_back(arrEntity[0]);
+		m_entRunInfo[arrEntity[0]].bGetLoadOpt = true;
+		if (arrEntity[1].Compare("1") == 0)
+		{
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s config with loadopt 1", arrEntity[0].GetData());
+			m_entRunInfo[arrEntity[0]].loadOpt = 1;
+		}
+		else if (arrEntity[1].Compare("2") == 0)
+		{
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s config with loadopt 2", arrEntity[0].GetData());
+			m_entRunInfo[arrEntity[0]].loadOpt = 2;
+		}
+		else
+			m_entRunInfo[arrEntity[0]].loadOpt = 0;
+	}
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_activeEntity has %d entity", m_activeEntity.size());
 }

+ 3 - 5
Module/mod_selfchecker/SelfCheckerFSM.h

@@ -24,11 +24,10 @@
 #include <map>
 #include <vector>
 #include "SpFSM.h"
+#include "SpHelper.h"
 using namespace tinyxml2;
 using namespace std;
 
-#include "../mod_healthmanager/HealthManager_client_g.h"
-using namespace HealthManager;
 
 const int MAX_KEY_VALUE_SIZE = 1024;
 class	CSelfCheckerEntity;
@@ -144,7 +143,7 @@ public:
 		FSM_RULE_ENTRY(s0, s1, USER_EVT_INIT, 0)
 		END_FSM_RULE()
 
-		CSelfCheckerFSM() :m_warmLevel(0), m_bFirstCalcCpu(true), m_pHealthClient(NULL) , m_diskLastWarnHour(1)
+		CSelfCheckerFSM() :m_warmLevel(0), m_bFirstCalcCpu(true), m_diskLastWarnHour(1)
 	, m_bEverInMainPage(false), m_bHaveGetEntityList(false), m_bFWBEntityAdd(false){}
 	~CSelfCheckerFSM(){}
 	virtual ErrorCodeEnum OnInit();
@@ -178,6 +177,7 @@ public:
 	int Proc(string entity, ProcType eType, DWORD dwCode,const char *pszMessage="");
 	void SetEverEnterMainPageFlag(bool bValue = true);
 	void AddFWBEntityToList();
+	void GetEntityList(CSimpleStringA csList);
 private:
 	ErrorCodeEnum Initial();
 	void OnNormalWorkTimerout(void *pData);
@@ -189,7 +189,6 @@ private:
 	void CheckEntityResouce(const char *pszEntityName,CEntityRunInfo &Info);
 	//bool IsKeyEntity(const char *pszEntityName);
 	bool ReadXmlFile(const char *szFileName);
-	ErrorCodeEnum ConnectToHealthManager();
 	
 private:
 	map<CSimpleStringA,EntityCfgInfo> m_entCfgInfo;
@@ -202,7 +201,6 @@ private:
 	bool m_bInIssue,m_bFirstCalcCpu, m_bEverInMainPage,m_bHaveGetEntityList,m_bFWBEntityAdd;
 	//CSimpleStringA m_csKeyEntity;
 	__int64  m_xIdlePre,m_xKernelPre,m_xUserPre;
-	HealthManagerService_ClientBase *m_pHealthClient;
 	CSystemStaticInfo m_sysInfo;
 };
 

+ 17 - 0
Module/mod_selfchecker/mod_selfchecker.cpp

@@ -281,6 +281,23 @@ void CSelfCheckerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue,
 			m_fsm.SetEverEnterMainPageFlag();
 		}
 	}
+	else if ((_strnicmp(pszKey, "TerminalStage", strlen("TerminalStage")) == 0))
+	{
+		//oiltmp
+		if (!m_bGetEntityList)
+		{
+			m_bGetEntityList = true;
+			CSmartPointer<IConfigInfo> spConfigCen;
+			GetFunction()->OpenConfig(Config_CenterSetting, spConfigCen);
+			CSimpleStringA csCoreBootList(true), csSafeLoadList(true), csOperatingList(true), csKeyCB("CoreBootList."), csKeySL("SafeLoadList."), csKeyOp("OperatingList.");
+			spConfigCen->ReadConfigValue("VtmLoader", (csKeyCB + m_sysInfo.strMachineType).GetData(), csCoreBootList);
+			spConfigCen->ReadConfigValue("VtmLoader", (csKeySL + m_sysInfo.strMachineType).GetData(), csSafeLoadList);
+			spConfigCen->ReadConfigValue("VtmLoader", (csKeyOp + m_sysInfo.strMachineType).GetData(), csOperatingList);
+			m_fsm.GetEntityList(csCoreBootList);
+			m_fsm.GetEntityList(csSafeLoadList);
+			m_fsm.GetEntityList(csOperatingList);
+		}
+	}
 }
 
 SP_BEGIN_ENTITY_MAP()

+ 3 - 2
Module/mod_selfchecker/mod_selfchecker.h

@@ -29,7 +29,7 @@ class CSelfCheckerEntity : public CEntityBase,public IEntityLifeListener,public
 	,public ILogListener
 {
 public:
-	CSelfCheckerEntity():m_bIEIdle(false), m_bEverInMainPage(false), m_maxEtyRestartTimes(5){ }
+	CSelfCheckerEntity():m_bIEIdle(false), m_bEverInMainPage(false), m_maxEtyRestartTimes(5), m_bGetEntityList(false){ }
 	virtual ~CSelfCheckerEntity() {}
 	virtual const char *GetEntityName() const { return "SelfChecker"; }
 	
@@ -66,6 +66,7 @@ public:
 		GetFunction()->SubscribeLog(m_uuidCardSwiper,this,Log_Event,Severity_High,Error_IgnoreAll,-1,"CardSwiper",false);
 		GetFunction()->SubscribeLog(m_uuidCardSwiper, this, Log_Error, Severity_Middle, Error_IgnoreAll, -1, "CardSwiper");
 		GetFunction()->RegistSysVarEvent("UIState", this);
+		GetFunction()->RegistSysVarEvent("TerminalStage", this);
 		m_csQueryStateEntity = "CardIssuer,CardSwiper,IDCertificate,PinPad,MediaController,CounterConnector";
 		CSmartPointer<IConfigInfo> spCenterConfig;
 		CSimpleStringA csQueryStateEntity(true);
@@ -133,7 +134,7 @@ public:
 private:
 	CSelfCheckerFSM m_fsm;
 	map<CSimpleStringA,EntityProcessInfo> m_entityProcInfo;
-	bool m_bIEIdle, m_bEverInMainPage;
+	bool m_bIEIdle, m_bEverInMainPage, m_bGetEntityList;
 	CUUID m_uuidCardIsuuer,m_uuidCardSwiper,m_uuidPinPad,m_uuidIDCertificate,m_uuidMedia;
 	CSimpleStringA m_csQueryStateEntity;
 	vector<CSimpleStringA> m_vQueryStateEntity;

+ 15 - 14
Module/mod_vtmloader/VtmLoaderFSM.cpp

@@ -711,13 +711,12 @@ void CVtmLoaderFSM::s4_on_entry()
 	LOG_FUNCTION();
 	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "Operating 阶段实体加载完成");
 	//oiltmp wait for analyse progress, then change to app log format
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_NetCard_Cost, CSimpleStringA::Format("%d", m_ullNetCardCost));
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_NetworkDetect_Cost, CSimpleStringA::Format("%d", m_ullNetDetectCost));
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_GetConfig_Cost, CSimpleStringA::Format("%d", m_ullGetConfigCost));
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_NetCard_Cost, CSimpleStringA::Format("%d", m_ullNetCardCost).GetData());
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_NetworkDetect_Cost, CSimpleStringA::Format("%d", m_ullNetDetectCost).GetData());
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_GetConfig_Cost, CSimpleStringA::Format("%d", m_ullGetConfigCost).GetData());
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F16")("Stage Operating have done.");
 	NoticeEntityLoadTask* pTask = new NoticeEntityLoadTask(this,Event_VtmLoader_EntityLoad_Finished);
 	GetEntityBase()->GetFunction()->PostThreadPoolTask(pTask);
-	//LogEvent(Severity_Middle, Event_VtmLoader_EntityLoad_Finished, "实体启动完成");
 }
 void CVtmLoaderFSM::s4_on_exit()
 {
@@ -861,7 +860,7 @@ int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
 				//LogWarn(Severity_High, Error_Unexpect, VtmLoader_UserCode_NetCard_UnAvaible, strMsg.GetData());
 				//LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, strMsg.GetData());
 				LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("%s。%d 秒后自动重试(第%d次重试)。请检查网线是否插好、网络是否正常"
-					, strMsg.GetData(), m_iDetectInterval / 1000, netcheckCount));
+					, strMsg.GetData(), m_iDetectInterval / 1000, netcheckCount).GetData());
 				//if (tmpTS.Compare("E") != 0)
 				//{
 				//	GetEntityBase()->GetFunction()->SetSysVar("TerminalStage", "E");
@@ -941,7 +940,7 @@ int CVtmLoaderFSM::EntityLoad()
 		}
 		else
 		{
-			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("CoreBoot配置异常,请联系总行开发人员检查(%s)", csCoreBootList.GetData()));
+			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("CoreBoot配置异常,请联系总行开发人员检查(%s)", csCoreBootList.GetData()).GetData());
 			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setLogCode("QLR040210F14").setResultCode("RTA1F05")(CSimpleStringA::Format("CoreBoot配置异常,请联系总行开发人员检查(%s)", csCoreBootList.GetData()));
 		}
 		//if have PinPad module
@@ -1245,8 +1244,9 @@ void CVtmLoaderFSM::NoticeEntityLoad(int evtCode)
 				break;
 		}
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Notice HealthManager failed,eErrConn:%d,eErrCall:%d", eErrConn, eErrCall);
+		Sleep(2000);
 		count++;
-	} while (count < 3);
+	} while (count < 100);
 }
 bool CVtmLoaderFSM::DetectHttpActive()
 {
@@ -1366,7 +1366,7 @@ bool CVtmLoaderFSM::GetConfig()
 	CSimpleStringA csTmpRootIni("");
 	if (!IsRootINIExist(csTmpRootIni))
 	{
-		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("root.ini不存在,请检查(%s)", csTmpRootIni.GetData()));
+		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("root.ini不存在,请检查(%s)", csTmpRootIni.GetData()).GetData());
 		return false;
 	}
 	ErrorCodeEnum eErr = Error_Succeed;
@@ -1375,6 +1375,7 @@ bool CVtmLoaderFSM::GetConfig()
 	CSimpleString tokenSecret = "eca829c78067c686561bd844129321c8a78af3";
 	CSimpleString CommonLaunchUrl = "https://rvc-gateway.paasst.cmbchina.cn|https://rvc-gateway-out.paasst.cmbchina.cn";
 	CSimpleString CenterConfigTotal = "https://accessproxy-service.paasst.cmbchina.cn/centerconfig";
+
 #elif defined(DEVOPS_ON_UAT)/*DevOps流水线编译,UAT环境*/
 	CSimpleString channelId = "7eb748cb71744c87b5c126e05af8cce7";
 	CSimpleString tokenSecret = "eca529c78967c640561bd844229391c8a78af3";
@@ -1394,7 +1395,7 @@ bool CVtmLoaderFSM::GetConfig()
 	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "开始拉取配置");
 	if (Error_Succeed != (eErr = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->InitCfgUrl(channelId, tokenSecret, CommonLaunchUrl, CenterConfigTotal)))
 	{
-		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("拉取配置,初始化配置地址失败:0x%x(%s)", eErr, SpStrError(eErr)));
+		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("拉取配置,初始化配置地址失败:0x%x(%s)", eErr, SpStrError(eErr)).GetData());
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F13").setResultCode("RTA1F01")("Get config,InitCfgUrl failed.");
 		LogEvent(Severity_High, Event_VtmLoader_GetConfig_Fail, "拉取配置,初始化配置地址失败");
 		return false;
@@ -1407,7 +1408,7 @@ bool CVtmLoaderFSM::GetConfig()
 		//if token update failed,we can also update cfg suc
 		if (Error_Succeed != (eErr = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->TryUpdateCfg()))
 		{
-			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("拉取配置失败:0x%x(%s)", eErr, SpStrError(eErr)));
+			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("拉取配置失败:0x%x(%s)", eErr, SpStrError(eErr)).GetData());
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F13").setResultCode("RTA1F03")("Get config, TryUpdateCfg failed:0x%x", eErr);
 			LogEvent(Severity_High, Event_VtmLoader_GetConfig_Fail, "拉取配置失败");
 			return false;
@@ -1520,7 +1521,7 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
 #endif
 		if (!bCheckOK)
 		{
-			LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("尝试连接总行服务失败(%s),%d 秒后自动重试(第%d次重试)。请确认终端到总行服务网络是否正常", csHttAddr.GetData(), m_iDetectInterval/1000, httpcheckCount));
+			LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("尝试连接总行服务失败(%s),%d 秒后自动重试(第%d次重试)。请确认终端到总行服务网络是否正常", csHttAddr.GetData(), m_iDetectInterval/1000, httpcheckCount).GetData());
 			m_httpCheckResult[eType] = HttpConnResult_Failed;
 			Sleep(m_iDetectInterval);
 			httpcheckCount++;
@@ -1531,7 +1532,7 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
 				GetDns(tmpDns);
 				for (int i = 0; i < netList.GetCount(); i++) {
 					LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("(%d)interface:%s; ip:%s; mac:%s; %s", i, netList[i].description.c_str()
-						, netList[i].ip.c_str(), netList[i].mac.c_str(), tmpDns.c_str()));
+						, netList[i].ip.c_str(), netList[i].mac.c_str(), tmpDns.c_str()).GetData());
 				}
 			}
 		}
@@ -1541,9 +1542,9 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
 			if ((SP::Module::Comm::RVCGetTickCount() - beginTick) > 3000)
 			{
 				LogWarn(Severity_Low, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("第(%d)次尝试连接总行服务成功(%s),但是网络偏慢,连接花了(%d)秒,请检查网络!"
-					, httpcheckCount, csHttAddr.GetData(), (SP::Module::Comm::RVCGetTickCount() - beginTick)/1000));
+					, httpcheckCount, csHttAddr.GetData(), (SP::Module::Comm::RVCGetTickCount() - beginTick)/1000).GetData());
 			}
-			LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, CSimpleStringA::Format("尝试连接总行服务成功(%s)", csHttAddr.GetData()));
+			LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, CSimpleStringA::Format("尝试连接总行服务成功(%s)", csHttAddr.GetData()).GetData());
 			return 0;
 		}
 	}