Prechádzať zdrojové kódy

Z991239-6460 #comment runinfo优化到runcfg

80374374 1 mesiac pred
rodič
commit
429473c6e9

+ 0 - 1
Framework/spshell/spshell.cpp

@@ -146,7 +146,6 @@ static CSimpleStringA CutSpPathFromPathValue(const char* value, const char* pref
         if (!values[i].IsStartWith(prefix) && !IsSpPathType(values[i], "version") &&! IsSpPathType(values[i], "dep")) {
             if (!result.IsNullOrEmpty()) result += ENV_SEP_STR;
             result += values[i];
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("toadd:%s", values[i].GetData());
         }
     }
     //if (!result.IsNullOrEmpty() && path[path.GetLength() - 1] == ENV_SEP_CHAR) {

+ 3 - 3
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -768,9 +768,9 @@ void ResourceWatcherFSM::AutoDeleteFiles()
     pFunc->OpenConfig(Config_CenterSetting, spConfig);
 
     //判断是否升级完毕,未完成升级不进行删除任务
-    CSimpleStringA strRunInfo, strStartTime;
-    if (m_pEntity->GetFunction()->GetPath("RunInfo", strRunInfo) == Error_Succeed) {
-        strStartTime = strRunInfo + SPLIT_SLASH_STR + "runcfg" + SPLIT_SLASH_STR + "starttime.dat";
+    CSimpleStringA strRunCfg, strStartTime;
+    if (m_pEntity->GetFunction()->GetPath("RunCfg", strRunCfg) == Error_Succeed) {
+        strStartTime = strRunCfg + SPLIT_SLASH_STR + "starttime.dat";
         if (!ExistsFileA(strStartTime.GetData())) {
             DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade prpcess done, try to delete version files.");//完成升级过程,通过
         }

+ 4 - 4
Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

@@ -5801,9 +5801,9 @@ bool CUpgradeTaskFSM::isWork()
 	
 	//升级任务
 	if((!m_currentTask.NewVersion.IsNullOrEmpty())&&(m_currentTask.cPendingState=="T"||m_currentTask.cPendingState=="C"||m_currentTask.cPendingState=="X")){
-		CSimpleStringA strRunInfo,strStartTime;
-		if (m_pEntity->GetFunction()->GetPath("RunInfo",strRunInfo) == Error_Succeed){
-			strStartTime = strRunInfo + SPLIT_SLASH_STR "runcfg" SPLIT_SLASH_STR "starttime.dat";
+		CSimpleStringA strRunCfg,strStartTime;
+		if (m_pEntity->GetFunction()->GetPath("RunCfg",strRunCfg) == Error_Succeed){
+			strStartTime = strRunCfg + SPLIT_SLASH_STR + "starttime.dat";
 			if(!ExistsFileA(strStartTime.GetData())){
 				return true;//完成升级过程,通过
 			}else{
@@ -5811,7 +5811,7 @@ bool CUpgradeTaskFSM::isWork()
 				return false;//继续等待
 			}
 		}else{
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("upgrade process is not end ,get runinfo path is error");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("upgrade process is not end ,get runinfo path is error");
 			return false;//失败,继续等待
 		}
 	}

+ 3 - 3
Module/mod_cardissuerstore/CardIssuerStoreFSM.cpp

@@ -1399,11 +1399,11 @@ ErrorCodeEnum CCardIssuerFSM::OnInit()
 	{
 		if(!sysInfo.strManufacturer.Compare("Eastcom", true))
 		{
-			CSimpleStringA runinfoPath(true);
+			CSimpleStringA RunCfgPath(true);
 			CSimpleStringA depPath(true);
-			GetEntityBase()->GetFunction()->GetPath("RunInfo", runinfoPath);
+			GetEntityBase()->GetFunction()->GetPath("RunCfg", RunCfgPath);
 			GetEntityBase()->GetFunction()->GetPath("Dep", depPath);
-			CSimpleStringA runinfodbFile = runinfoPath + "\\runcfg\\CardLibDB_CMB.db3";
+			CSimpleStringA runinfodbFile = RunCfgPath + "\\CardLibDB_CMB.db3";
 			CSimpleStringA depdbFile = depPath + "\\CardLibDB_CMB.db3";
 
 			if (ExistsFileA(depdbFile) && !ExistsFileA(runinfodbFile))

+ 8 - 8
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -932,19 +932,19 @@ bool CHealthManagerEntity::DoRestart()
 
 bool CHealthManagerEntity::SaveCurrentVersion()
 {
-	CSimpleStringA csRootVer,csRunInfo,csBakFile,csVerFile;
+	CSimpleStringA csRootVer,csRunCfg,csBakFile,csVerFile;
 	ErrorCodeEnum eErr;
 	if ((eErr = GetFunction()->GetPath("RootVer",csRootVer)) != Error_Succeed)
 	{
 		DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM)("Get version path failed(%s).", SpStrError(eErr));
 		return false;
 	}
-	if ((eErr = GetFunction()->GetPath("RunInfo",csRunInfo)) != Error_Succeed)
+	if ((eErr = GetFunction()->GetPath("RunCfg", csRunCfg)) != Error_Succeed)
 	{
-		DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM)("get runinfo path failed(%s)", SpStrError(eErr));
+		DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM)("get RunCfg path failed(%s)", SpStrError(eErr));
 		return false;
 	}
-	csBakFile = csRunInfo + SPLIT_SLASH_STR "runcfg" SPLIT_SLASH_STR "version.dat";
+	csBakFile = csRunCfg + SPLIT_SLASH_STR + "version.dat";
 	ofstream outfile (csBakFile,std::ofstream::binary);
 
 	CSmartPointer<IConfigInfo> spConfigRun;
@@ -971,16 +971,16 @@ bool CHealthManagerEntity::SaveCurrentVersion()
 }
 bool CHealthManagerEntity::SaveFrameStartTimeForUpgrade()
 {
-	CSimpleStringA csRunInfo,csBakFile;
+	CSimpleStringA csRunCfg,csBakFile;
 	ErrorCodeEnum eErr;
 
-	if ((eErr = GetFunction()->GetPath("RunInfo",csRunInfo)) != Error_Succeed)
+	if ((eErr = GetFunction()->GetPath("RunCfg",csRunCfg)) != Error_Succeed)
 	{
-		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("get runinfo path failed(%s)", SpStrError(eErr));
+		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("get RunCfg path failed(%s)", SpStrError(eErr));
 		return false;
 	}
 
-	csBakFile = csRunInfo + SPLIT_SLASH_STR "runcfg" SPLIT_SLASH_STR "starttime.dat";
+	csBakFile = csRunCfg + SPLIT_SLASH_STR + "starttime.dat";
 	ofstream outfile (csBakFile,std::ofstream::binary);
 
 	CSystemRunInfo sysRunInfo;

+ 3 - 3
Module/mod_localmediaplay/mod_localmediaplay.cpp

@@ -2183,13 +2183,13 @@ bool CLocalMediaPlayEntity::IsRunConfigExist()
 	CSimpleStringA strPath;
 	ErrorCodeEnum eErr;
 
-	if ((eErr = GetFunction()->GetPath("RunInfo", strPath)) != Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("get runinfo path failed(%d)", eErr);
+	if ((eErr = GetFunction()->GetPath("RunCfg", strPath)) != Error_Succeed){
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("get RunCfg path failed(%d)", eErr);
 		return false;
 	}
 
 	CSimpleStringA strRuninfoFile;
-	strRuninfoFile = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "runcfg" SPLIT_SLASH_STR "%s.ini", (LPCTSTR)strPath, GetEntityName());
+	strRuninfoFile = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s.ini", (LPCTSTR)strPath, GetEntityName());
 	if (ExistsFileA(strRuninfoFile)) {
 		return true;
 	}

+ 6 - 6
Module/mod_pinpad/PinPadFSM.cpp

@@ -413,10 +413,10 @@ int CPinPadFSM::Initial()
 	else
 		SetErrorAndLog(eErrDev, MEC_DEVAPI_EPP_GetDevCategory, "DevAdapter::GetDevCategory", __FUNCTION__, IsInBusiness(), m_ullEndTime - m_ullBeginTime);
 
-	CSimpleStringA csRunInfo, csSNBakFile, csBakSN("");
-	if ((eErr = GetEntityBase()->GetFunction()->GetPath("RunInfo", csRunInfo)) == Error_Succeed)
+	CSimpleStringA csRunCfg, csSNBakFile, csBakSN("");
+	if ((eErr = GetEntityBase()->GetFunction()->GetPath("RunCfg", csRunCfg)) == Error_Succeed)
 	{
-		csSNBakFile = csRunInfo + SPLIT_SLASH_STR + "runcfg" + SPLIT_SLASH_STR + "snbak.dat";
+		csSNBakFile = csRunCfg + SPLIT_SLASH_STR + "snbak.dat";
 		ifstream infile(csSNBakFile.GetData(), std::ofstream::binary);
 		char* buffer = new char[16];
 		ZeroMemory(buffer, 16);
@@ -1069,10 +1069,10 @@ int CPinPadFSM::LoadKeySM(SpReqAnsContext<PinPadService_LoadKeysSM_Req, PinPadSe
 			LogWarn(Severity_Low, Error_Unexpect, PinPad_UserErrorCode_PinPad_LoadKey_SMSN
 				, CSimpleStringA::Format("{\"subject\":\"key_sn\",\"value\":\"%s\"}", m_keySNSM.GetData()));
 			//oiltmp@20240521 add for redundancy to check
-			CSimpleStringA csRunInfo,csSNBakFile;
-			if ((eErr = GetEntityBase()->GetFunction()->GetPath("RunInfo", csRunInfo)) == Error_Succeed)
+			CSimpleStringA csRunCfg,csSNBakFile;
+			if ((eErr = GetEntityBase()->GetFunction()->GetPath("RunCfg", csRunCfg)) == Error_Succeed)
 			{
-				csSNBakFile = csRunInfo + SPLIT_SLASH_STR + "runcfg" + SPLIT_SLASH_STR + "snbak.dat";
+				csSNBakFile = csRunCfg + SPLIT_SLASH_STR + "snbak.dat";
 				ofstream outfile(csSNBakFile, std::ofstream::binary|ios::trunc);
 
 				int size = m_keySNSM.GetLength();