Explorar el Código

#IQRV #comment 本地配置移除同步WIN端逻辑

80374374 hace 2 años
padre
commit
2e67475edd

+ 1 - 1
Module/CMakeLists.txt

@@ -1,4 +1,4 @@
-
+
 #设置实体名称 ${MODULE_NAME},和实体前缀定义 ${MODULE_PREFIX}
 macro(define_module _module_name)
 	set(MODULE_NAME "mod_${_module_name}")

+ 6 - 33
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -508,7 +508,6 @@ ErrorCodeEnum ResourceWatcherFSM::OnInit()
     erroCode = spConfig->ReadConfigValueInt("TOPProcess", "cpu", cpuTop);    //读取需要监控的CPU进程个数
     if (erroCode != Error_Succeed) {
         Dbg("Get CPU TOP NUM failed: %s.", SpStrError(erroCode));
-        return Error_Unexpect;
     }
     if (cpuTop == 0) {
         cpuTop = 10; //From static config
@@ -1799,7 +1798,7 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
     CSmartPointer<IConfigInfo> spConfig;
     spFunction->OpenConfig(Config_CenterSetting, spConfig);
     spConfig->ReadConfigValueInt("VersionSaved", "default", tmpSaved);
-    if (tmpSaved > DEFAULT_VERSION_SAVED_COUNT) {
+    if (tmpSaved > verSaved) {
         verSaved = tmpSaved;
     }
     int nPackCount = intallInfoVects.size();
@@ -1809,17 +1808,14 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
     if (nPackCount != 0) {
         int nSavedCount = 0;
         sort(intallInfoVects.begin(), intallInfoVects.end());
-        //vector<CInstallInfoEx>::iterator iter = intallInfoVects.begin();
         vector<CVersion>::reverse_iterator riter = intallInfoVects.rbegin();
         while (riter != intallInfoVects.rend()) {
-            //Dbg("InstallPackage Info: %s, SwithOverDate: %s", (LPCTSTR)iter->InstallVersion.ToString(), (LPCTSTR)iter->tmSwithOverDate.ToTimeString());
             Dbg("InstallPackage Info: %s", (LPCTSTR)(*riter).ToString());
             if (++nSavedCount <= verSaved) {
                 Dbg("Save above version");
                 riter++;
                 continue;
             }
-            //if (!DeleteSpecificeVersionDir(iter->InstallVersion))
             if(!DeleteSpecificeVersionDir(*riter))
                 bFailFlag = true;
             else
@@ -4006,6 +4002,7 @@ string ResourceWatcherFSM::MemoryProcessStatus()
     CSmartPointer<IEntityFunction> spFunction = this->GetEntityBase()->GetFunction();
     CSmartPointer<IConfigInfo> spConfig;
     ErrorCodeEnum erroCode = Error_Unexpect;
+    ///*TODO: 不要每次都进来读取配置文件 (80374374@5/17/2023)*/
     spFunction->OpenConfig(Config_CenterSetting, spConfig);
     int memTop = 0;
     erroCode = spConfig->ReadConfigValueInt("TOPProcess", "mem", memTop);
@@ -4023,7 +4020,6 @@ string ResourceWatcherFSM::MemoryProcessStatus()
         string entityName = runInfo.strRunningEntityNames[i].GetData();
         CEntityRunInfo entityInfo = { 0 };
         GetEntityBase()->GetFunction()->GetEntityRunInfo(entityName.c_str(), entityInfo);
-        //Dbg("No. %d Current run entity : %s, procesID = %d !", i + 1, entityName, entityInfo.dwProcessID);
         nameProcess[to_string(entityInfo.dwProcessID)] = entityName;
     }
 
@@ -4035,31 +4031,21 @@ string ResourceWatcherFSM::MemoryProcessStatus()
 
     string s;
     string str[4];
-
-    //cout << "---------MEMORY----------" << endl;    
-
     //mem
     Dbg("MEM TOP %d PROCESS!", memTop);
     string topMessage = "";
     while (i < memTop)
     {
         fgets(buffer, sizeof(buffer), fp);
-
         s = buffer;
         istringstream is(s);
         is >> str[0] >> str[1] >> str[2] >> str[3];
-
-
         double temp;
         stringstream ss1;
         ss1 << str[2];
         ss1 >> temp;
         temp = temp / (1024 * 1024);
 
-       /* stringstream ss2;
-        ss2 << temp;
-        ss2 >> str[2];*/
-        //printf("%s", s.c_str());
         stringstream ss2;
         ss2 << std::setiosflags(std::ios::fixed) << std::setprecision(2) << temp;
         str[2] = ss2.str();
@@ -4069,25 +4055,16 @@ string ResourceWatcherFSM::MemoryProcessStatus()
             str[3] = nameProcess[str[0]];
         }
 
-        //cout << str[0] << ", " << str[1] << ", " << str[2] << " GB," << str[3] << endl;
-        //Dbg("Process id = %s, Memory usage = %s, Memory size = %s, Process Name = %s. ", 
-                //str[0].c_str(), (str[1] + "%").c_str(), (str[2] + " GB").c_str(), str[3].c_str());
-         //topMessage = topMessage + "\"" + str[3] + "\"" + ":" + "\"" + str[1] + "%|" + str[2] + " GByte\"";
          topMessage = topMessage + "\"" + str[3] + "\"" + ":" + "\"" + str[1] + "%\"";
          
          if (i != memTop - 1)
          {
              topMessage += ",";
          }
-        //cout << s;
 
         ++i;
     }
     topMessage += "}";
-    //Dbg("%s", topMessage.c_str());
-   /* LogWarn(Severity_Low, Error_Resource, LOG_EVT_RESOURCE_CPU_TOO_HIGH,
-        CSimpleStringA::Format("%s", topMessage.c_str())
-    );*/
     pclose(fp);
     return topMessage;
 }
@@ -4882,20 +4859,14 @@ void ResourceWatcherFSM::ConfirmDNSConfigHasSet()
     LOG_FUNCTION();
 
     CSimpleStringA dns1(true), dns2(true);
-
+#if 1
     CSmartPointer<IConfigInfo> spConfig;
     GetEntityBase()->GetFunction()->OpenConfig(Config_CenterSetting, spConfig);
-#ifdef DEVOPS_ON_PRD
     spConfig->ReadConfigValue("DNS", "dns1", dns1);
     spConfig->ReadConfigValue("DNS", "dns2", dns2);
-    Dbg("prd enviromemt");
-#else
-    spConfig->ReadConfigValue("DNSTest", "dns1", dns1);
-    spConfig->ReadConfigValue("DNSTest", "dns2", dns2);
-    Dbg("test enviromemt");
-#endif // DEVOPS_ON_PRD
 
 #else
+
     dns1 = m_strDefaultDns;
     dns2 = m_strBackupDns;
 
@@ -4925,8 +4896,10 @@ void ResourceWatcherFSM::ConfirmDNSConfigHasSet()
         Dbg("not any dns set at entity config.");
         return;
     }
+
     if (dns2.IsNullOrEmpty()) dns2 = dns1;
     if (dns1.IsNullOrEmpty()) dns1 = dns2;
+
     return;
 
     //////////////////////////////////////////////////////////////////////////

+ 141 - 141
Module/mod_UpgradeMgr/UpgradeTaskFSM.h

@@ -15,7 +15,7 @@ using namespace std;
 
 namespace HttpStruct
 {
-	//发送文件hash列表接口
+	//鍙戦€佹枃浠秇ash鍒楄〃鎺ュ彛
 	struct SendSM3TaskReq : CHTTPReq {
 		string m_reqStr;
 		string ToJson() {
@@ -30,7 +30,7 @@ namespace HttpStruct
 		}
 	};
 
-	//更新任务状态接口
+	//鏇存柊浠诲姟鐘舵€佹帴鍙�
 	struct UpdateTaskStatusReq : CHTTPReq {
 		string m_reqStr;
 		string ToJson() {
@@ -45,7 +45,7 @@ namespace HttpStruct
 		}
 	};
 
-	//查询当前任务
+	//鏌ヨ�褰撳墠浠诲姟
 	struct QueryCurrTaskReq : CHTTPReq {
 		string m_reqStr;
 		string ToJson() {
@@ -60,7 +60,7 @@ namespace HttpStruct
 		}
 	};
 
-	//查询新任务
+	//鏌ヨ�鏂颁换鍔�
 	struct QueryNewTaskReq : CHTTPReq {
 		string m_reqStr;
 		string ToJson() {
@@ -75,7 +75,7 @@ namespace HttpStruct
 		}
 	};
 
-	//断点下载升级包
+	//鏂�偣涓嬭浇鍗囩骇鍖�
 	struct DownloadPackTaskRet{
 		long content_length;
         long origin_file_length;
@@ -87,7 +87,7 @@ namespace HttpStruct
 
 
 
-// 升级任务状态机
+// 鍗囩骇浠诲姟鐘舵€佹満
 class CUpgradeTaskFSM : public FSMImpl<CUpgradeTaskFSM>, public IFSMStateHooker, public ISysVarListener
 {
 public:
@@ -125,7 +125,7 @@ public:
 
 	struct SendSM3TaskEvent:public FSMEvent
 	{
-		bool isSucc;//是否写入成功
+		bool isSucc;//鏄�惁鍐欏叆鎴愬姛
 		SendSM3TaskEvent(bool isSendSucc) 
 			: FSMEvent(Event_EndSendSM3Task), isSucc(isSendSucc)
 		{}
@@ -134,7 +134,7 @@ public:
 
 	struct UpdateTaskStatusEvent:public FSMEvent
 	{
-		bool isSucc;//是否更新成功
+		bool isSucc;//鏄�惁鏇存柊鎴愬姛
 		UpdateTaskStatusEvent(bool isSendSucc) 
 			: FSMEvent(Event_EndUpdateTask), isSucc(isSendSucc)
 		{}
@@ -142,8 +142,8 @@ public:
 
 	struct QueryCurrTaskEvent:public FSMEvent
 	{
-		bool isSucc;//是否查询成功
-		bool isTask_valid;//任务是否有效
+		bool isSucc;//鏄�惁鏌ヨ�鎴愬姛
+		bool isTask_valid;//浠诲姟鏄�惁鏈夋晥
 		QueryCurrTaskEvent(bool isSendSucc,bool isValid) 
 			: FSMEvent(Event_EndQueryCurrTask), isSucc(isSendSucc),isTask_valid(isValid)
 		{}
@@ -151,7 +151,7 @@ public:
 
 	struct QueryNewTaskEvent:public FSMEvent
 	{
-		bool isSucc;//是否查询成功
+		bool isSucc;//鏄�惁鏌ヨ�鎴愬姛
 		QueryNewTaskEvent(bool isSendSucc) 
 			: FSMEvent(Event_EndPoll), isSucc(isSendSucc)
 		{}
@@ -159,7 +159,7 @@ public:
 
 	struct QueryNewContinueTaskEvent:public FSMEvent
 	{
-		int retParam;//是否查询成功
+		int retParam;//鏄�惁鏌ヨ�鎴愬姛
 		QueryNewContinueTaskEvent(int ret) 
 			: FSMEvent(Event_EndContinuePoll)
 		{
@@ -169,7 +169,7 @@ public:
 
 	struct QueryNewPreTaskEvent:public FSMEvent
 	{
-		bool isSucc;//是否查询成功
+		bool isSucc;//鏄�惁鏌ヨ�鎴愬姛
 		QueryNewPreTaskEvent(bool isSendSucc) 
 			: FSMEvent(Event_EndPrePoll), isSucc(isSendSucc)
 		{}
@@ -177,8 +177,8 @@ public:
 
 	struct QueryTaskStatusEvent:public FSMEvent
 	{
-		bool isSucc;//是否查询成功
-		bool isTask_valid;//任务是否有效
+		bool isSucc;//鏄�惁鏌ヨ�鎴愬姛
+		bool isTask_valid;//浠诲姟鏄�惁鏈夋晥
 		QueryTaskStatusEvent(bool isSendSucc,bool isValid) 
 			: FSMEvent(Event_EndQueryTaskStatus), isSucc(isSendSucc),isTask_valid(isValid)
 		{}
@@ -194,7 +194,7 @@ public:
 
 	struct DownloadPackTaskFailEvent:public FSMEvent
 	{
-		string errMsg;//错误信息
+		string errMsg;//閿欒�淇℃伅
 		DownloadPackTaskFailEvent(string errorMsg) 
 			: FSMEvent(Event_Download_Fail), errMsg(errorMsg)
 		{}
@@ -228,79 +228,79 @@ public:
 
 	struct CInstallStep
 	{
-		//不存储到运行时
-		int stepSeq; //步骤序号
-		CSimpleStringA cmdType;		//升级安装需执行命令类型:Delete、Copy、Run
-		int cmdFail;		//0:执行失败认为升级失败 1:执行失败忽略继续升级
-		CSimpleStringA srcPathType; //0:相对路径 1:绝对路径 2:当前版本相对路径 3:升级包相对路径
+		//涓嶅瓨鍌ㄥ埌杩愯�鏃�
+		int stepSeq; //姝ラ�搴忓彿
+		CSimpleStringA cmdType;		//鍗囩骇瀹夎�闇€鎵ц�鍛戒护绫诲瀷:Delete銆丆opy銆丷un
+		int cmdFail;		//0锛氭墽琛屽け璐ヨ�涓哄崌绾уけ璐� 1锛氭墽琛屽け璐ュ拷鐣ョ户缁�崌绾�
+		CSimpleStringA srcPathType; //0锛氱浉瀵硅矾寰� 1锛氱粷瀵硅矾寰� 2锛氬綋鍓嶇増鏈�浉瀵硅矾寰� 3锛氬崌绾у寘鐩稿�璺�緞
 		CSimpleStringA srcPath;		
-		CSimpleStringA dstPathType;	//0:相对路径 1:绝对路径 2:当前版本相对路径 3:升级版本相对路径 4:升级包相对路径
+		CSimpleStringA dstPathType;	//0锛氱浉瀵硅矾寰� 1锛氱粷瀵硅矾寰� 2锛氬綋鍓嶇増鏈�浉瀵硅矾寰� 3锛氬崌绾х増鏈�浉瀵硅矾寰� 4锛氬崌绾у寘鐩稿�璺�緞
 		CSimpleStringA dstPath;
 	};
 
-	// 待安装任务信息(运行时保存的中间变量)
+	// 寰呭畨瑁呬换鍔′俊鎭�紙杩愯�鏃朵繚瀛樼殑涓�棿鍙橀噺锛�
 	struct CTaskInfo
-	{	//存储到运行时
-		CSimpleStringA upgradeTaskId;	//升级任务编号
-		CSimpleStringA createTaskVersion;//创建升级任务时的版本号
-		CSimpleStringA cPendingState;	// 已下载D、安装中I、等待切换S、任务结果确认T
-		CSimpleStringA NewVersion;		// 任务升级后的版本号
-		CSimpleStringA pack_name;		//升级包名
-		//不存储到运行时
-		CSimpleStringA pack_version;	//升级包指定的版本号
-		//CSimpleStringA to_copy;			//拷贝文件列表
-		//CSimpleStringA to_run;			//体系外运行脚本文件名称
-		bool stop_media_play;   //停止广告播放(0:不停止 1:停止)
-		int reboot_type;		//重启策略类型(0:不启动 1:重启框架 2:重启系统)
-		CSimpleStringA file_path;       //升级包路径
-		CSimpleStringA download_url;    //升级包下载地址
-		CSimpleStringA pack_hash;		//升级包hash值
-		long pack_length;		//升级包长度(服务端暂时不传)
-
-		queue<CInstallStep*> install_step;//安装步骤队列
+	{	//瀛樺偍鍒拌繍琛屾椂
+		CSimpleStringA upgradeTaskId;	//鍗囩骇浠诲姟缂栧彿
+		CSimpleStringA createTaskVersion;//鍒涘缓鍗囩骇浠诲姟鏃剁殑鐗堟湰鍙�
+		CSimpleStringA cPendingState;	// 宸蹭笅杞紻銆佸畨瑁呬腑I銆佺瓑寰呭垏鎹�銆佷换鍔$粨鏋滅‘璁�
+		CSimpleStringA NewVersion;		// 浠诲姟鍗囩骇鍚庣殑鐗堟湰鍙�
+		CSimpleStringA pack_name;		//鍗囩骇鍖呭悕
+		//涓嶅瓨鍌ㄥ埌杩愯�鏃�
+		CSimpleStringA pack_version;	//鍗囩骇鍖呮寚瀹氱殑鐗堟湰鍙�
+		//CSimpleStringA to_copy;			//鎷疯礉鏂囦欢鍒楄〃
+		//CSimpleStringA to_run;			//浣撶郴澶栬繍琛岃剼鏈�枃浠跺悕绉�
+		bool stop_media_play;   //鍋滄�骞垮憡鎾�斁锛�0:涓嶅仠姝� 1:鍋滄�锛�
+		int reboot_type;		//閲嶅惎绛栫暐绫诲瀷锛�0:涓嶅惎鍔� 1:閲嶅惎妗嗘灦 2:閲嶅惎绯荤粺锛�
+		CSimpleStringA file_path;       //鍗囩骇鍖呰矾寰�
+		CSimpleStringA download_url;    //鍗囩骇鍖呬笅杞藉湴鍧€
+		CSimpleStringA pack_hash;		//鍗囩骇鍖卙ash鍊�
+		long pack_length;		//鍗囩骇鍖呴暱搴�(鏈嶅姟绔�殏鏃朵笉浼�)
+
+		queue<CInstallStep*> install_step;//瀹夎�姝ラ�闃熷垪
 
 	};
 
 	
 	struct CTaskProcess
 	{
-		CSimpleStringA strPackName;//包名
-		CSimpleStringA installVersion;//安装版本号
-		CVersion CurrentVersion;//当前版本号
-		CSimpleStringA cInstallState;//升级状态
-		CSimpleStringA strInstallComment;//升级状态备注
+		CSimpleStringA strPackName;//鍖呭悕
+		CSimpleStringA installVersion;//瀹夎�鐗堟湰鍙�
+		CVersion CurrentVersion;//褰撳墠鐗堟湰鍙�
+		CSimpleStringA cInstallState;//鍗囩骇鐘舵€�
+		CSimpleStringA strInstallComment;//鍗囩骇鐘舵€佸�娉�
 	};
 
 	struct CenterUrl
 	{
-		string updateTaskUrl;		//更新升级任务url
-		string queryCurrTaskUrl;	//查询当前任务url
-		string queryNewTaskUrl;		//查询新任务url(旧版本使用)
-		string queryPreTaskUrl;		//预查询新任务url
-		string queryContinueTaskUrl; //继续查询新任务url
-		string queryTaskStatus;		//查询当前任务是否有效url
-		string sendSM3TaskUrl;		//发送文件hashurl
+		string updateTaskUrl;		//鏇存柊鍗囩骇浠诲姟url
+		string queryCurrTaskUrl;	//鏌ヨ�褰撳墠浠诲姟url
+		string queryNewTaskUrl;		//鏌ヨ�鏂颁换鍔�rl锛堟棫鐗堟湰浣跨敤锛�
+		string queryPreTaskUrl;		//棰勬煡璇㈡柊浠诲姟url
+		string queryContinueTaskUrl; //缁х画鏌ヨ�鏂颁换鍔�rl
+		string queryTaskStatus;		//鏌ヨ�褰撳墠浠诲姟鏄�惁鏈夋晥url
+		string sendSM3TaskUrl;		//鍙戦€佹枃浠秇ashurl
 	};
 
 	struct HashScanSet
 	{
-		CSimpleStringA relativeDir;	//相对路径
-		CSimpleStringA absoluteDir;	//绝对路径 
-		CSimpleStringA currVerDir;	//当前版本相对路径
-		CSimpleStringA blackFile;	//不纳入扫描的文件名称
-		CSimpleStringA blackDir;	//不纳入扫描的文件夹
+		CSimpleStringA relativeDir;	//鐩稿�璺�緞
+		CSimpleStringA absoluteDir;	//缁濆�璺�緞 
+		CSimpleStringA currVerDir;	//褰撳墠鐗堟湰鐩稿�璺�緞
+		CSimpleStringA blackFile;	//涓嶇撼鍏ユ壂鎻忕殑鏂囦欢鍚嶇О
+		CSimpleStringA blackDir;	//涓嶇撼鍏ユ壂鎻忕殑鏂囦欢澶�
 	};
 
 public:
 	CUpgradeTaskFSM(){
-		isSendHash = false;//默认查询策略不发送hash
-		m_isSM3HashSucc = false;//默认hash计算失败
+		isSendHash = false;//榛樿�鏌ヨ�绛栫暐涓嶅彂閫乭ash
+		m_isSM3HashSucc = false;//榛樿�hash璁$畻澶辫触
 		m_bDownloadIdle = false;
 		m_bTaskCancel=false;
-		m_fileSM3ListHash="";//终端hash列表64位hash值
-		m_fileSM3List = "";//终端hash列表值
-		m_strPreTaskId="";//预检查任务ID
-		m_bNeedHash=0;//预检查是否需要hash
+		m_fileSM3ListHash="";//缁堢�hash鍒楄〃64浣峢ash鍊�
+		m_fileSM3List = "";//缁堢�hash鍒楄〃鍊�
+		m_strPreTaskId="";//棰勬�鏌ヤ换鍔�D
+		m_bNeedHash=0;//棰勬�鏌ユ槸鍚﹂渶瑕乭ash
 		m_eachDownloadLen=DOWNLOAD_CONTENT_EACH_LEN;
 		m_newEachDownloadLen=DOWNLOAD_CONTENT_EACH_LEN;
 		m_PrintHttpLog =false;
@@ -308,37 +308,37 @@ public:
 		m_iBlackFileCount=0;
 	}
 	~CUpgradeTaskFSM(){}
-	//具体实现方法
-	//ErrorCodeEnum UpdatePackInstall(string updatePackName,CSimpleStringA &strErrMsg);//系统升级包安装
-	ErrorCodeEnum CreateNewVersion(CVersion NewSoftwareVersion,CSimpleStringA &strErrInfo);//创建新版本
-	ErrorCodeEnum ClearUpgradeFailVersion(CVersion NewSoftwareVersion);//清理升级新版本临时文件
-	//int SysPackInstall(string sysPackName, CSimpleStringA &strErrMsg);//体系外升级包安装 0:失败 1:成功 -1:未知
-	bool GetSysUpgradeResult(const char *pszResultLog, CSimpleStringA &eErrorCode, CSimpleStringA &strErrMsg);//从体系外生成的result.log文件中获取结果
-	//ErrorCodeEnum LightPackInstall(string LightPackName, CSimpleStringA &strErrMsg);//轻量升级包安装
-
-	//安装执行步骤方法
-	int ExecInstall(CSimpleStringA &strErrMsg);//升级安装 0:失败 1:成功 -1:未知
+	//鍏蜂綋瀹炵幇鏂规硶
+	//ErrorCodeEnum UpdatePackInstall(string updatePackName,CSimpleStringA &strErrMsg);//绯荤粺鍗囩骇鍖呭畨瑁�
+	ErrorCodeEnum CreateNewVersion(CVersion NewSoftwareVersion,CSimpleStringA &strErrInfo);//鍒涘缓鏂扮増鏈�
+	ErrorCodeEnum ClearUpgradeFailVersion(CVersion NewSoftwareVersion);//娓呯悊鍗囩骇鏂扮増鏈�复鏃舵枃浠�
+	//int SysPackInstall(string sysPackName, CSimpleStringA &strErrMsg);//浣撶郴澶栧崌绾у寘瀹夎� 0:澶辫触 1:鎴愬姛 -1:鏈�煡
+	bool GetSysUpgradeResult(const char *pszResultLog, CSimpleStringA &eErrorCode, CSimpleStringA &strErrMsg);//浠庝綋绯诲�鐢熸垚鐨剅esult.log鏂囦欢涓�幏鍙栫粨鏋�
+	//ErrorCodeEnum LightPackInstall(string LightPackName, CSimpleStringA &strErrMsg);//杞婚噺鍗囩骇鍖呭畨瑁�
+
+	//瀹夎�鎵ц�姝ラ�鏂规硶
+	int ExecInstall(CSimpleStringA &strErrMsg);//鍗囩骇瀹夎� 0锛氬け璐� 1锛氭垚鍔� -1锛氭湭鐭�
 	int ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins);
 	bool ExecDeleteCmd(CSimpleStringA &strErrMsg,CInstallStep* ins);
 	bool ExecCpoyCmd(CSimpleStringA &strErrMsg,CInstallStep* ins);
-	bool GetRootTypePath(int rootType,CSimpleStringA &rootPath);//1:相对路径 2:当前版本相对路径 3:升级版本相对路径 4:升级包相对路径
+	bool GetRootTypePath(int rootType,CSimpleStringA &rootPath);//1:鐩稿�璺�緞 2锛氬綋鍓嶇増鏈�浉瀵硅矾寰� 3锛氬崌绾х増鏈�浉瀵硅矾寰� 4锛氬崌绾у寘鐩稿�璺�緞
 	ErrorCodeEnum CopyFileOperate(const char* srcPath, const char* destPath, int nCopyMode, CSimpleStringA &strErrMsg);
 
 
 
-	//ErrorCodeEnum CopyFileToNewVersion(string updatePackPath,const char *pszRelativeFile,const char * newVersion, int nCopyMode);//拷贝增量文件到新版本
-	ErrorCodeEnum SetRunSucceed(const char* pPackFile);//成功切换新版本
-	ErrorCodeEnum UpgradeToNewVersion();//设置新版本状态
-	ErrorCodeEnum RollBackToHistoryVersion(CVersion historyVersion);//回退到某个历史版本
+	//ErrorCodeEnum CopyFileToNewVersion(string updatePackPath,const char *pszRelativeFile,const char * newVersion, int nCopyMode);//鎷疯礉澧為噺鏂囦欢鍒版柊鐗堟湰
+	ErrorCodeEnum SetRunSucceed(const char* pPackFile);//鎴愬姛鍒囨崲鏂扮増鏈�
+	ErrorCodeEnum UpgradeToNewVersion();//璁剧疆鏂扮増鏈�姸鎬�
+	ErrorCodeEnum RollBackToHistoryVersion(CVersion historyVersion);//鍥為€€鍒版煇涓�巻鍙茬増鏈�
 	
 	//ErrorCodeEnum CopyFolder(CSimpleStringA strSourcePath, CSimpleStringA strDestPath);
 	void RecursiveGetSubFiles(const char *pszDir, const char *pszTrimStart, list<CSimpleStringA>& retList);
 	bool IsFileMatch(const char *pszFilter, const char *pszFileName);
-	bool RecursiveCopyDir(const char *pszSourceDir, const char *pszDestDir,CSimpleStringA &strErrInfo);//可以合并
-	CSimpleStringA GetFileDirectory(const char *pszFullPath);//查找文件的父路径
-	bool IsWow64Process();//判断是否是64位windows程序
-	int system_on(string cmdFilePath, bool isWait,CSimpleStringA &errMsg);//cmd窗口程序
-	int waitSystem(string cmd, const char * par, bool nShow,CSimpleStringA &errMsg);//起进程执行cmd
+	bool RecursiveCopyDir(const char *pszSourceDir, const char *pszDestDir,CSimpleStringA &strErrInfo);//鍙�互鍚堝苟
+	CSimpleStringA GetFileDirectory(const char *pszFullPath);//鏌ユ壘鏂囦欢鐨勭埗璺�緞
+	bool IsWow64Process();//鍒ゆ柇鏄�惁鏄�64浣峸indows绋嬪簭
+	int system_on(string cmdFilePath, bool isWait,CSimpleStringA &errMsg);//cmd绐楀彛绋嬪簭
+	int waitSystem(string cmd, const char * par, bool nShow,CSimpleStringA &errMsg);//璧疯繘绋嬫墽琛宑md
 	
 
 	char* ConvertUtf8ToGBK(const char* strUtf8);
@@ -347,8 +347,8 @@ public:
 	void ConvertGBKToUtf8(std::string &str);
 	bool is_str_utf8(const char* str);
 
-	ErrorCodeEnum UnzipPack(const char* unZipPackName);//解压文件
-	ErrorCodeEnum DeleteUnzipDir();//清理临时解压包文件
+	ErrorCodeEnum UnzipPack(const char* unZipPackName);//瑙e帇鏂囦欢
+	ErrorCodeEnum DeleteUnzipDir();//娓呯悊涓存椂瑙e帇鍖呮枃浠�
 	
 	
 
@@ -356,31 +356,31 @@ public:
 	ErrorCodeEnum GetRunConfigStrValue(const char *pszSection, const char *pszKey, CSimpleStringA &strValue);
 	ErrorCodeEnum SetRunConfigStrValue(const char *pszSection, const char *pszKey, const char *pszValue);
 
-	bool ClearCurrTaskInfo();//任务无效清除运行时记录和残留下载包
-	bool ClearInstallStep();//清理历史任务安装步骤
+	bool ClearCurrTaskInfo();//浠诲姟鏃犳晥娓呴櫎杩愯�鏃惰�褰曞拰娈嬬暀涓嬭浇鍖�
+	bool ClearInstallStep();//娓呯悊鍘嗗彶浠诲姟瀹夎�姝ラ�
 
-	ErrorCodeEnum LoadPersistTaskInfo();//启动开始加载运行时文件
-	ErrorCodeEnum loadCenterCfgInfo();//启动开始加载集中配置文件
+	ErrorCodeEnum LoadPersistTaskInfo();//鍚�姩寮€濮嬪姞杞借繍琛屾椂鏂囦欢
+	ErrorCodeEnum loadCenterCfgInfo();//鍚�姩寮€濮嬪姞杞介泦涓�厤缃�枃浠�
 
-	bool GetFileLength(const char* filePath,long &fileLen);//获取文件长度
-	ErrorCodeEnum GetSM3List(CSimpleStringA &strSM3List);//获取版本文件hash集合字符串
+	bool GetFileLength(const char* filePath,long &fileLen);//鑾峰彇鏂囦欢闀垮害
+	ErrorCodeEnum GetSM3List(CSimpleStringA &strSM3List);//鑾峰彇鐗堟湰鏂囦欢hash闆嗗悎瀛楃�涓�
 	//ErrorCodeEnum SM3Folder(CSimpleStringA strFolderPath,CSimpleStringA replaceStr,CSimpleStringA prefix,bool isDepDir=false);
 	ErrorCodeEnum ScanSM3ByType(int type,CSimpleStringA pathFilter);
-	ErrorCodeEnum NewSM3Folder(CSimpleStringA scanFilter,CSimpleStringA replaceDir);//新的hash扫描文件夹实现
+	ErrorCodeEnum NewSM3Folder(CSimpleStringA scanFilter,CSimpleStringA replaceDir);//鏂扮殑hash鎵�弿鏂囦欢澶瑰疄鐜�
 
-	//新国密SM3函数,isSub表示是否截取新国密中间一段密文
+	//鏂板浗瀵哠M3鍑芥暟锛宨sSub琛ㄧず鏄�惁鎴�彇鏂板浗瀵嗕腑闂翠竴娈靛瘑鏂�
 	ErrorCodeEnum SM3FileToStr(CSimpleStringA strFilePath, CSimpleStringA &strSM3,bool isSub);
 	ErrorCodeEnum SM3DataToStr(CSimpleStringA strData, CSimpleStringA &strSM3,bool isSub);
 	ErrorCodeEnum SM3_Str(CSimpleStringA &strSM3,BYTE * SM3Byte,bool isSub);
 
-	bool IsPackDownloaded(const char *pPackName,const char* packHash,long packLen);//判断安装包是否已下载成功
+	bool IsPackDownloaded(const char *pPackName,const char* packHash,long packLen);//鍒ゆ柇瀹夎�鍖呮槸鍚﹀凡涓嬭浇鎴愬姛
 	bool DownloadFileWrite(byte* content,long contentLen,const char* filePath);
 
-	bool CheckIfCanSwitchNow();//是否允许切换
-	ErrorCodeEnum SwitchUpgradeNow();//切换版本
+	bool CheckIfCanSwitchNow();//鏄�惁鍏佽�鍒囨崲
+	ErrorCodeEnum SwitchUpgradeNow();//鍒囨崲鐗堟湰
 
-	ErrorCodeEnum DownloadProgress(long tempFileLen,long fileSumLen);//返回下载进度
-	char GetInstallState(int nState);//根据状态机获取升级状态
+	ErrorCodeEnum DownloadProgress(long tempFileLen,long fileSumLen);//杩斿洖涓嬭浇杩涘害
+	char GetInstallState(int nState);//鏍规嵁鐘舵€佹満鑾峰彇鍗囩骇鐘舵€�
 	ErrorCodeEnum GetUpgradeState(bool &bInstalling, CSimpleStringA &strPackFile, CSimpleStringA &strExecID,
 		char &cInstallState, bool &bSysInstall, bool &bLightPack, CSimpleStringA &strNewVersion);
 	
@@ -401,13 +401,13 @@ private:
 	enum{s1, s2, s3, s4, s5, s6, s7};
 
 	BEGIN_FSM_STATE(CUpgradeTaskFSM)
-		FSM_STATE_ENTRY(s1, "Start",s1_on_entry,s1_on_exit,s1_on_event)//计算hash值
-		FSM_STATE_ENTRY(s2, "DealTask",s2_on_entry,s2_on_exit,s2_on_event)//处理上个任务,反馈任务结果,并根据任务状态跳转到其他状态
-		FSM_STATE_ENTRY(s3, "Poll",s3_on_entry,s3_on_exit,s3_on_event)//查询任务
-		FSM_STATE_ENTRY(s4, "Download", s4_on_entry, s4_on_exit, s4_on_event)//下载安装包
-		FSM_STATE_ENTRY(s5, "Install", s5_on_entry, s5_on_exit, s5_on_event)//安装升级包
-		FSM_STATE_ENTRY(s6, "Switch", s6_on_entry, s6_on_exit, s6_on_event)//进行版本切换
-		FSM_STATE_ENTRY(s7, "Disable", s7_on_entry, s7_on_exit, s7_on_event)//静止状态
+		FSM_STATE_ENTRY(s1, "Start",s1_on_entry,s1_on_exit,s1_on_event)//璁$畻hash鍊�
+		FSM_STATE_ENTRY(s2, "DealTask",s2_on_entry,s2_on_exit,s2_on_event)//澶勭悊涓婁釜浠诲姟锛屽弽棣堜换鍔$粨鏋滐紝骞舵牴鎹�换鍔$姸鎬佽烦杞�埌鍏朵粬鐘舵€�
+		FSM_STATE_ENTRY(s3, "Poll",s3_on_entry,s3_on_exit,s3_on_event)//鏌ヨ�浠诲姟
+		FSM_STATE_ENTRY(s4, "Download", s4_on_entry, s4_on_exit, s4_on_event)//涓嬭浇瀹夎�鍖�
+		FSM_STATE_ENTRY(s5, "Install", s5_on_entry, s5_on_exit, s5_on_event)//瀹夎�鍗囩骇鍖�
+		FSM_STATE_ENTRY(s6, "Switch", s6_on_entry, s6_on_exit, s6_on_event)//杩涜�鐗堟湰鍒囨崲
+		FSM_STATE_ENTRY(s7, "Disable", s7_on_entry, s7_on_exit, s7_on_event)//闈欐�鐘舵€�
 	END_FSM_STATE()
 
 	BEGIN_FSM_RULE(CUpgradeTaskFSM,s1)
@@ -418,37 +418,37 @@ private:
 		FSM_RULE_ENTRY(s2, s6, Event_EndQueryCurrTask, 6)
 		FSM_RULE_ENTRY_ANY(s3, s4, Event_StartDownload)
 		FSM_RULE_ENTRY_ANY(s4, s5, Event_StartInstall)
-		FSM_RULE_ENTRY_ANY(s4, s3, Event_StartPoll)//任务取消进入S3
-		FSM_RULE_ENTRY_ANY(s4, s2, Event_StartDealTask)//下载失败进入S2
+		FSM_RULE_ENTRY_ANY(s4, s3, Event_StartPoll)//浠诲姟鍙栨秷杩涘叆S3
+		FSM_RULE_ENTRY_ANY(s4, s2, Event_StartDealTask)//涓嬭浇澶辫触杩涘叆S2
 		FSM_RULE_ENTRY_ANY(s5, s6, Event_StartSwitch)
-		FSM_RULE_ENTRY_ANY(s5, s2, Event_StartDealTask)//安装失败进入S2
-		FSM_RULE_ENTRY_ANY(s6, s2, Event_StartDealTask)//无需重启框架和系统切换成功进入S2
-		FSM_RULE_ENTRY_ANY(s6, s3, Event_StartPoll)//取消任务进入S3
-		FSM_RULE_ENTRY_ANY(s6, s7, Event_PreRestart)//重启服务
+		FSM_RULE_ENTRY_ANY(s5, s2, Event_StartDealTask)//瀹夎�澶辫触杩涘叆S2
+		FSM_RULE_ENTRY_ANY(s6, s2, Event_StartDealTask)//鏃犻渶閲嶅惎妗嗘灦鍜岀郴缁熷垏鎹㈡垚鍔熻繘鍏�2
+		FSM_RULE_ENTRY_ANY(s6, s3, Event_StartPoll)//鍙栨秷浠诲姟杩涘叆S3
+		FSM_RULE_ENTRY_ANY(s6, s7, Event_PreRestart)//閲嶅惎鏈嶅姟
 	END_FSM_RULE()
 
 private:
-	//完成
+	//瀹屾垚
 	void s1_on_entry();
 	void s1_on_exit();
 	unsigned int s1_on_event(FSMEvent* event);
-	//完成
+	//瀹屾垚
 	void s2_on_entry();
 	void s2_on_exit();
 	unsigned int s2_on_event(FSMEvent* event);
-	//完成
+	//瀹屾垚
 	void s3_on_entry();
 	void s3_on_exit();
 	unsigned int s3_on_event(FSMEvent* event);
-	//完成
+	//瀹屾垚
 	void s4_on_entry();
 	void s4_on_exit();
 	unsigned int s4_on_event(FSMEvent* event);
-	//完成
+	//瀹屾垚
 	void s5_on_entry();
 	void s5_on_exit();
 	unsigned int s5_on_event(FSMEvent* event);
-	//完成
+	//瀹屾垚
 	void s6_on_entry();
 	void s6_on_exit();
 	unsigned int s6_on_event(FSMEvent* event);
@@ -461,36 +461,36 @@ private:
 
 	
 	
-	list<CSimpleStringA> m_DepWhitelist; //dep文件夹白名单
-	list<CSimpleStringA> m_DirBlacklist; //整体文件夹黑名单
-	list<CSimpleStringA> m_FileBlacklist; //整体文件黑名单
+	list<CSimpleStringA> m_DepWhitelist; //dep鏂囦欢澶圭櫧鍚嶅崟
+	list<CSimpleStringA> m_DirBlacklist; //鏁翠綋鏂囦欢澶归粦鍚嶅崟
+	list<CSimpleStringA> m_FileBlacklist; //鏁翠綋鏂囦欢榛戝悕鍗�
 
 public:
-	map<CSimpleStringA, CSimpleStringA> m_fileSM3Map;	// 版本文件hash值集合
+	map<CSimpleStringA, CSimpleStringA> m_fileSM3Map;	// 鐗堟湰鏂囦欢hash鍊奸泦鍚�
 
-	CTaskInfo m_currentTask;	//当前的任务缓存变量
-	CVersion m_currentVersion;  //当前终端版本
+	CTaskInfo m_currentTask;	//褰撳墠鐨勪换鍔$紦瀛樺彉閲�
+	CVersion m_currentVersion;  //褰撳墠缁堢�鐗堟湰
 
-	CenterUrl m_centerUrl;//访问总行的url地址集合
-	int m_eachDownloadLen;//每次下载数据长度阈值(M)
-	int m_newEachDownloadLen;//新的每次下载数据长度阈值(k)
-	bool m_PrintHttpLog;  //是否打印通讯日志
-	bool m_startFlag; //升级实体启动标志位,默认是不开,
-	HashScanSet m_hashScanSet;//扫描文件hash设置
+	CenterUrl m_centerUrl;//璁块棶鎬昏�鐨剈rl鍦板潃闆嗗悎
+	int m_eachDownloadLen;//姣忔�涓嬭浇鏁版嵁闀垮害闃堝€�(M)
+	int m_newEachDownloadLen;//鏂扮殑姣忔�涓嬭浇鏁版嵁闀垮害闃堝€�(k)
+	bool m_PrintHttpLog;  //鏄�惁鎵撳嵃閫氳�鏃ュ織
+	bool m_startFlag; //鍗囩骇瀹炰綋鍚�姩鏍囧織浣�,榛樿�鏄�笉寮€锛�
+	HashScanSet m_hashScanSet;//鎵�弿鏂囦欢hash璁剧疆
 
-	bool m_isSM3HashSucc;//hash是否计算成功
-	bool isSendHash;//hash是否发送
-	CSimpleStringA m_fileSM3ListHash;//SM3 64位hash
-	CSimpleStringA m_fileSM3List;//版本文件hash集合字符串
-	DWORD m_beginSendSM3Time;//开始发送sm3hahs时间
-	int m_queryNewTaskCount;//查询新任务时无任务次数
+	bool m_isSM3HashSucc;//hash鏄�惁璁$畻鎴愬姛
+	bool isSendHash;//hash鏄�惁鍙戦€�
+	CSimpleStringA m_fileSM3ListHash;//SM3 64浣峢ash
+	CSimpleStringA m_fileSM3List;//鐗堟湰鏂囦欢hash闆嗗悎瀛楃�涓�
+	DWORD m_beginSendSM3Time;//寮€濮嬪彂閫乻m3hahs鏃堕棿
+	int m_queryNewTaskCount;//鏌ヨ�鏂颁换鍔℃椂鏃犱换鍔℃�鏁�
 
-	bool m_bDownloadIdle;	//是否下载空闲 true: 不能下载,false: 可下载
-	bool m_bTaskCancel;		//是否任务取消 true: 任务取消,false: 未取消
+	bool m_bDownloadIdle;	//鏄�惁涓嬭浇绌洪棽 true: 涓嶈兘涓嬭浇锛宖alse: 鍙�笅杞�
+	bool m_bTaskCancel;		//鏄�惁浠诲姟鍙栨秷 true: 浠诲姟鍙栨秷锛宖alse: 鏈�彇娑�
 
-	int m_iBlackFileCount;    //黑名单文件数量
+	int m_iBlackFileCount;    //榛戝悕鍗曟枃浠舵暟閲�
 
-	CSimpleStringA m_strPreTaskId; //预检查taskId
-	int m_bNeedHash;//是否需要hash对比查询任务
+	CSimpleStringA m_strPreTaskId; //棰勬�鏌�askId
+	int m_bNeedHash;//鏄�惁闇€瑕乭ash瀵规瘮鏌ヨ�浠诲姟
 };
 #endif //RVC_MOD_UPGRADETASK_FSM_H_

+ 19 - 5
Module/mod_accessauth/AccessAuthFSM.cpp

@@ -1560,16 +1560,30 @@ bool CAccessAuthFSM::DecryptWithSessionKey(BYTE* encText, int encTextLen, BYTE *
 }
 int CAccessAuthFSM::RtsMapToUserCode(const char* pRtsCode, DWORD dwDefaultUserCode)
 {
-	LOG_FUNCTION();
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("RtsCode:%s",pRtsCode);
+	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)
+	if (tmpUserCode > 0) {
 		return tmpUserCode;
-	else
-		return dwDefaultUserCode;
+
+	} 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;
+		}
+	}
 }
 
 CSimpleStringA CAccessAuthFSM::GetEntryPermitSysVar()

+ 28 - 48
Module/mod_evtconverter/mod_evtconverter.cpp

@@ -25,10 +25,10 @@ public:
 		{
 			LOG_FUNCTION();
 		}
-		//MessageBoxA(0,0,0,0);
 		m_eDeviceType = eStand2sType;  //add by chh
 		m_nIslog = 1;
 		ErrorCodeEnum Error;
+		CSimpleStringA str;
 		CSmartPointer<IEntityFunction> spEntityFunction = GetFunction();
 
 		//is Pad Version
@@ -69,53 +69,34 @@ public:
             LOG_TRACE("get etc directory failed!");
             return Error;
         }
-		const int num = 3;
 		CAutoArray<CSimpleStringA> ConfigFiles;
-		if ((ePadtype == m_eDeviceType)||(eMobilePadType == m_eDeviceType))
-		{
-			ConfigFiles.Init(3);
-            ConfigFiles[0] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "SipphoneEvent.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEventpad.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[2] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "DeviceNetworkEvent.xml", (LPCSTR)strConfigDir);
-		}
-		else if (eRpm1sType == m_eDeviceType) // add by ly
-		{
-            ConfigFiles.Init(3);
-            ConfigFiles[0] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "SipphoneEvent.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEventRpm1s.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[2] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "DeviceNetworkEvent.xml", (LPCSTR)strConfigDir);
-		}
-		else if (eCardStore == m_eDeviceType)
-		{
-            ConfigFiles.Init(3);
-            ConfigFiles[0] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "SipphoneEvent.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEventDesk2s.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[2] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "DeviceNetworkEvent.xml", (LPCSTR)strConfigDir);
-		}
-		else
-		{
-            ConfigFiles.Init(3);
-            ConfigFiles[0] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "SipphoneEvent.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEvent.xml", (LPCSTR)strConfigDir);
-            ConfigFiles[2] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "DeviceNetworkEvent.xml", (LPCSTR)strConfigDir);
+		ConfigFiles.Init(3);
+		const int num = 3;
+		ConfigFiles[0] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "SipphoneEvent.xml", (LPCSTR)strConfigDir);
+		ConfigFiles[2] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "DeviceNetworkEvent.xml", (LPCSTR)strConfigDir);
+		if ((ePadtype == m_eDeviceType) || (eMobilePadType == m_eDeviceType)) {
+			ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEventpad.xml", (LPCSTR)strConfigDir);
+		} else if (eDesk2SType == m_eDeviceType || eDesk1SType == m_eDeviceType || eDesk2SIntegratedType == m_eDeviceType) {
+			ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEventDesk2s.xml", (LPCSTR)strConfigDir);
+		} else if (eCardStore == m_eDeviceType) {
+			ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEventDesk2s.xml", (LPCSTR)strConfigDir);
+		} else {
+			ConfigFiles[1] = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "CustomerApproachEvent.xml", (LPCSTR)strConfigDir);
 		}
+
 		//is log
-        CSmartPointer<IConfigInfo> spConfig;
-        Error = spEntityFunction->OpenConfig(Config_CenterSetting, spConfig);
+        CSmartPointer<IConfigInfo> spConfigCenterSetting;
+        Error = spEntityFunction->OpenConfig(Config_CenterSetting, spConfigCenterSetting);
         if (Error != Error_Succeed) {
             LOG_TRACE("open config failed!");
             return Error;
         }
-		CSimpleStringA str(true);
-		int logSwitch(0);
-		Error = spConfig->ReadConfigValueInt("Log", "IsLog", logSwitch);
-		if (Error != Error_Succeed) 
-		{
-			LOG_TRACE("load config failed, read Log.IsLog failed!");
-			m_nIslog = 0;
-		} else {
-			m_nIslog = logSwitch;
+		Error = spConfigCenterSetting->ReadConfigValue(GetEntityName(), "IsLog", str);
+		if (Error != Error_Succeed) {
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("load config failed, read Log.IsLog failed!");
+			return Error;
 		}
+		m_nIslog = atoi(str);
 		SetLogType(m_nIslog);
 		evt_engine_t *engine;
 
@@ -132,15 +113,14 @@ public:
 		cb.unsubscribe_sysevent = &__unsubscribe_sysevent;
 		cb.user_data = this;
 		int rc = evt_engine_create(&cb, &engine);
-		if (rc != 0) 
-		{
-			LOG_TRACE("create engine failed!");
+		if (rc != 0) {
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("create engine failed!");
 			return (ErrorCodeEnum)rc;
 		}
-		if (m_nIslog)
-		{
-			LOG_TRACE("create engine ok!");
+		if (m_nIslog) {
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("create engine ok!");
 		}
+
 		if (num > 0) {
 			const char **files = new const char*[num];
 			for (int i = 0; i < num; ++i)
@@ -148,14 +128,14 @@ public:
 			rc = evt_engine_load(engine, num, files);
 			delete files;
 			if (rc != 0) {
-				LOG_TRACE("load config failed!");
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("load config failed!");
 				return (ErrorCodeEnum)rc;
 			}
 		}
 
 		rc = evt_engine_start(engine);
 		if (rc != 0) {
-			LOG_TRACE("start engine failed!");
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start engine failed!");
 			return (ErrorCodeEnum)rc;
 		}
 

+ 43 - 26
Module/mod_facetracking/mod_facetracking.cpp

@@ -336,18 +336,9 @@ public:
 	{
 		CSmartPointer<IEntityFunction> spFunction = GetFunction();
 		CSmartPointer<IConfigInfo> spConfig;
-		ErrorCodeEnum Error = spFunction->OpenConfig(Config_CenterSetting, spConfig);
-		if (Error == Error_Succeed) {
+		ErrorCodeEnum Error(Error_Succeed);
+		if (FALSE && (Error = spFunction->OpenConfig(Config_CenterSetting, spConfig)) == Error_Succeed) {
 			SpIniMappingTable table;
-			config.nServersType = 0;
-			CSimpleStringA strPath;
-			GetFunction()->GetPath("cfg", strPath);
-#ifdef RVC_OS_WIN
-			sprintf(config.strFaceDataDirPath, "%s%s%s", (LPCSTR)strPath, SPLIT_SLASH_STR, "facedata");
-#else
-			snprintf(config.strFaceDataDirPath, MAX_PATH,"%s%s%s", (LPCSTR)strPath, SPLIT_SLASH_STR, "facedata");
-#endif // RVC_OS_WIN
-
 			table.AddEntryInt("general", "PrimCamera", config.nPrimCamera, 0);
 			table.AddEntryInt("general", "ContourMinAera", config.nContourMinAera, 0);
 			table.AddEntryInt("general", "UpCameraEdgeLimit", config.nUpCameraEdgeLimit, 0);
@@ -363,24 +354,50 @@ public:
 			table.AddEntryInt("general", "SleepShort", config.nSleepShort, 0);
 			table.AddEntryInt("general", "ThresholdNum", config.nThresholdNum, 0);
 			Error = table.Load(spConfig);
-
-			config.nPrimCamera = 1;
-			config.nContourMinAera = 14400;
-			config.nUpCameraEdgeLimit = 3;
-			config.nDownCameraEdgeLimit = 2;
-            config.fOperateFaceSize = 4.2f;
-            config.fCloseFaceSize = 6.6f;
-            config.fFarFaceSize = 8.2f;
-            config.fSearchFaceSize = 8.2f;
-            config.fDetectFaceSize = 6.6f;
-            config.nFaceSizeOffset = 18;
-            config.nSleepLong = 800;
-            config.nSleepMiddle = 600;
-            config.nSleepShort = 500;
-            config.nThresholdNum = 10;
 		}
+
+		/*
+		PrimCamera=1
+		UpCameraEdgeLimit=3
+		DownCameraEdgeLimit=2
+		ServersType=0
+		ContourMinAera=14400
+		FaceDataDirPath=facedata
+		OperateFaceSize=4.2
+		CloseFaceSize=6.6
+		FarFaceSize=8.2
+		SearchFaceSize=8.2
+		DetectFaceSize=6.6
+		FaceSizeOffset=18
+		SleepLong=800
+		SleepMiddle=600
+		SleepShort=500
+		ThresholdNum=10
+		*/
+		CSimpleStringA strPath;
+		config.nServersType = 0;
+		GetFunction()->GetPath("cfg", strPath);
+		strcpy(config.strFaceDataDirPath, strPath);
+		strcat(config.strFaceDataDirPath, SPLIT_SLASH_STR "facedata");
+
+		config.nPrimCamera = 1;
+		config.nContourMinAera = 14400;
+		config.nUpCameraEdgeLimit = 3;
+		config.nDownCameraEdgeLimit = 2;
+		config.fOperateFaceSize = 4.2f;
+		config.fCloseFaceSize = 6.6f;
+		config.fFarFaceSize = 8.2f;
+		config.fSearchFaceSize = 8.2f;
+		config.fDetectFaceSize = 6.6f;
+		config.nFaceSizeOffset = 18;
+		config.nSleepLong = 800;
+		config.nSleepMiddle = 600;
+		config.nSleepShort = 500;
+		config.nThresholdNum = 10;
+		Error = Error_Succeed;
 		return Error == Error_Succeed;
 	}
+
 	virtual void Debug(const char *fmt, ...)
 	{
 		va_list arg;

+ 67 - 132
Module/mod_gpio/mod_gpio.cpp

@@ -705,72 +705,9 @@ void CGpioEntity::Set(GpioService_Set_Info req)
         devicePort = 12;
         break;
     }
-    ///**TODO(Gifur@1/9/2023): 移除 */
-    case PRINTER_SEAL:
-    {
-        if (!m_bNewVersion) {
-            bDone = TRUE;
-            break;
-        }
-        err = Error_Unexpect;
-        switch (req.mode) {
-        case PRINTER_LIGHT_GREEN:
-            LOG_TRACE("printseal green light on");
-            activeModeSecName = "LightNormal";
-            devicePort = 13;
-            break;
-        case PRINTER_LIGHT_RED:
-            LOG_TRACE("printseal red light on");
-            activeModeSecName = "RedLightNormal";
-            devicePort = 24;
-            break;
-        case PAPER_LIGHT_GREEN:
-            LOG_TRACE("paper slot green light on");
-            activeModeSecName = "LightNormal";
-            devicePort = 14;
-            break;
-        case PAPER_LIGHT_RED:
-            LOG_TRACE("paper slot red light on");
-            activeModeSecName = "RedLightNormal";
-            devicePort = 15;
-            break;
-        case PRINTER_LIGHT_OFF:
-            LOG_TRACE("printerseal light off");
-            err = Error_Pending;
-            break;
-        case PAPER_LIGHT_OFF:
-            LOG_TRACE("paper slot light off");
-            err = Error_Pending;
-            break;
-        default:
-            err = Error_Param;
-            break;
-        }
-        if (err == Error_Pending) {
-
-            CSimpleStringA initDriver1 = "", initDriver2 = "";
-            int devicePort1, devicePort2;
-
-            if (req.mode == PRINTER_LIGHT_OFF) {
-                devicePort1 = 13;
-                devicePort2 = 24;
-            } else {
-                devicePort1 = 14;
-                devicePort2 = 15;
-            }
-            if (err != Error_Succeed) {
-                DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("read cfg failed ~.");
-                return;
-            }
-            memset(&odi, 0, sizeof(odi));
-            SetOutDriving(req, odi, 0, devicePort1);
-            SetOutDriving(req, odi, 0, devicePort2);
-            bDone = TRUE;
-        }
-        break;
-    }
     break;
     default:
+        DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("unsupport device seq: %d", deviceSeq);
         return;
     }
 
@@ -796,7 +733,6 @@ void CGpioEntity::GetStatus(int deviceSeq, SpReqAnsContext<GpioService_GetStatus
     DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("GetStatus with devseq %d", deviceSeq);
     CSimpleStringA initDriver = "";
     int devicePort;
-    ErrorCodeEnum Error;
     /** 获取指定的模式,以便后续获取输入模式和持续触发模式,见 GetReceivingModInfo*/
     initDriver = "PhoneNormal";
     /** 获取硬件规格里对应的序号,其实是固定死的*/
@@ -1449,78 +1385,77 @@ bool CGpioEntity::GetReceiving(int deviceSeq, ReceivingInfo ri, ULONG iIndex,
 }
 void CGpioEntity::GetOutDrivingModInfo(CSimpleStringA modName, OutDrivingInfo& odi)
 {
-    ErrorCodeEnum Error;
-    if (modName.Compare("IDCertificateNormal") == 0) {
-        odi.OutputMode = 2;
-        odi.StopMode =2 ;
-        odi.SetTime = 150;
-        odi.ResetTime = 150;
-        odi.TimeOut = 5000;
-    } else if (modName.Compare("FingerPrintNormal") == 0) {
-        odi.OutputMode = 2;
-        odi.StopMode = 2;
-        odi.SetTime = 150;
-        odi.ResetTime = 150;
-        odi.TimeOut = 5000;
-    } else if (modName.Compare("CardReaderNormal") == 0) {
-        odi.OutputMode = 2;
-        odi.StopMode = 2;
-        odi.SetTime = 200;
-        odi.ResetTime = 200;
-        odi.TimeOut = 5000;
-    } else if (modName.Compare("AssistNormal") == 0) {
-        odi.OutputMode = 2;
-        odi.StopMode = 2;
-        odi.SetTime = 1000;
-        odi.ResetTime = 500;
-        odi.TimeOut = 5000;
-    } else if (modName.Compare("LightNormal") == 0) {
-        odi.OutputMode = 0;
-        odi.StopMode = 0;
-        odi.SetTime = 1000;
-        odi.ResetTime = 1000;
-        odi.TimeOut = 5000;
-    } else if (modName.Compare("PrinterNormal") == 0) {
-        odi.OutputMode = 0;
-        odi.StopMode = 1;
-        odi.SetTime = 200;
-        odi.ResetTime = 200;
-        odi.TimeOut = 3000;
-    } else if (modName.Compare("RedLightNormal") == 0) {
-        odi.OutputMode = 0;
-        odi.StopMode = 0;
-        odi.SetTime = 200;
-        odi.ResetTime = 200;
-        odi.TimeOut = 3000;
-    } else {
-        odi.OutputMode = 0;
-        odi.StopMode = 0;
-        odi.SetTime =200 ;
-        odi.ResetTime = 200;
-        odi.TimeOut = 5000;
-    } 
-    LOG_TRACE("outputmode.stopmode:[%d].[%d]", odi.OutputMode, odi.StopMode);
+	if (modName.Compare("IDCertificateNormal") == 0) {
+		odi.OutputMode = 2;
+		odi.StopMode = 2;
+		odi.SetTime = 150;
+		odi.ResetTime = 150;
+		odi.TimeOut = 5000;
+	} else if (modName.Compare("FingerPrintNormal") == 0) {
+		odi.OutputMode = 2;
+		odi.StopMode = 2;
+		odi.SetTime = 150;
+		odi.ResetTime = 150;
+		odi.TimeOut = 5000;
+	} else if (modName.Compare("CardReaderNormal") == 0) {
+		odi.OutputMode = 2;
+		odi.StopMode = 2;
+		odi.SetTime = 200;
+		odi.ResetTime = 200;
+		odi.TimeOut = 5000;
+	} else if (modName.Compare("AssistNormal") == 0) {
+		odi.OutputMode = 2;
+		odi.StopMode = 2;
+		odi.SetTime = 1000;
+		odi.ResetTime = 500;
+		odi.TimeOut = 5000;
+	} else if (modName.Compare("LightNormal") == 0) {
+		odi.OutputMode = 0;
+		odi.StopMode = 0;
+		odi.SetTime = 1000;
+		odi.ResetTime = 1000;
+		odi.TimeOut = 5000;
+	} else if (modName.Compare("PrinterNormal") == 0) {
+		odi.OutputMode = 0;
+		odi.StopMode = 1;
+		odi.SetTime = 200;
+		odi.ResetTime = 200;
+		odi.TimeOut = 3000;
+	} else if (modName.Compare("RedLightNormal") == 0) {
+		odi.OutputMode = 0;
+		odi.StopMode = 0;
+		odi.SetTime = 200;
+		odi.ResetTime = 200;
+		odi.TimeOut = 3000;
+	} else {
+		odi.OutputMode = 0;
+		odi.StopMode = 0;
+		odi.SetTime = 200;
+		odi.ResetTime = 200;
+		odi.TimeOut = 5000;
+	}
+	LOG_TRACE("outputmode.stopmode:[%d].[%d]", odi.OutputMode, odi.StopMode);
 }
 
 /*从配置文件中获取配置*/
 void CGpioEntity::GetReceivingModInfo(CSimpleStringA modName, ReceivingInfo& ri)
 {
-    if (modName.Compare("PhoneNormal") == 0) {
-        ri.InputMode = 4;
-        ri.ContinuousTriggerTime = 2;
-    } else if (modName.Compare("GpioNormal") == 0) {
-        ri.InputMode = 4;
-        ri.ContinuousTriggerTime = 10;
-    } else if (modName.Compare("CardGateNormal") == 0) {
-        ri.InputMode = 4;
-        ri.ContinuousTriggerTime = 10;
-    } else if (modName.Compare("ShakeNormal") == 0) {
-        ri.InputMode = 4;
-        ri.ContinuousTriggerTime = 4;
-    } else {
-        ri.InputMode = 4;
-        ri.ContinuousTriggerTime = 10;
-    }
+	if (modName.Compare("PhoneNormal") == 0) {
+		ri.InputMode = 4;
+		ri.ContinuousTriggerTime = 2;
+	} else if (modName.Compare("GpioNormal") == 0) {
+		ri.InputMode = 4;
+		ri.ContinuousTriggerTime = 10;
+	} else if (modName.Compare("CardGateNormal") == 0) {
+		ri.InputMode = 4;
+		ri.ContinuousTriggerTime = 10;
+	} else if (modName.Compare("ShakeNormal") == 0) {
+		ri.InputMode = 4;
+		ri.ContinuousTriggerTime = 4;
+	} else {
+		ri.InputMode = 4;
+		ri.ContinuousTriggerTime = 10;
+	}
 }
 
 BYTE CGpioEntity::GetOutputStatus(int sn)

+ 6 - 6
Module/mod_gpio/mod_gpio.h

@@ -35,14 +35,14 @@ enum InputMode{
 	IM_NEGATIVE_LEVEL
 };
 enum PinPort{
-	VIBRATIONSENSOR, /**震动探测器*/
-	OPENSENSOR, /*开机箱门感应器*/
-	PICKUPSENSOR, /*话机感应器*/
-	MOVESENSOR, /**人体探测感应器*/
-	CARDGATESENSOR, /**发卡器卡嘴感应器*/
+	VIBRATIONSENSOR, /**闇囧姩鎺㈡祴鍣�*/
+	OPENSENSOR, /*寮€鏈虹�闂ㄦ劅搴斿櫒*/
+	PICKUPSENSOR, /*璇濇満鎰熷簲鍣�*/
+	MOVESENSOR, /**浜轰綋鎺㈡祴鎰熷簲鍣�*/
+	CARDGATESENSOR, /**鍙戝崱鍣ㄥ崱鍢存劅搴斿櫒*/
 };
 
-/*用于标识等挂机等状态,布尔型不能满足,需要有一个初始状态*/
+/*鐢ㄤ簬鏍囪瘑绛夋寕鏈虹瓑鐘舵€侊紝甯冨皵鍨嬩笉鑳芥弧瓒筹紝闇€瑕佹湁涓€涓�垵濮嬬姸鎬�*/
 enum PinActiveStatus
 {
 	Unknown,

+ 1 - 0
Module/mod_livenessdetection/CMakeLists.txt

@@ -82,6 +82,7 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${CONAN_RVCFRAMEWORK_ROOT}/include/libtoolkit
 	${CONAN_INCLUDE_DIRS_OPENCV}
     ${CONAN_INCLUDE_DIRS_OPENCV}/opencv
+	${CONAN_INCLUDE_DIRS_OPENSSL}
 	${CONAN_INCLUDE_DIRS_FFMPEG}
 	${OTHER_LIB_BASE_DIR}/libvideoqueue
 	${OTHER_LIB_BASE_DIR}/libvideoframework

+ 9 - 4
Module/mod_selfchecker/SelfCheckerFSM.cpp

@@ -4,6 +4,7 @@
 #include "SelfCheckerFSM.h"
 #include "SpHelper.h"
 #include "EventCode.h"
+#include "path.h"
 
 #pragma comment(lib,"user32.lib")
 
@@ -278,14 +279,18 @@ ErrorCodeEnum CSelfCheckerFSM::Initial()
         if (value != 0) m_diskHighPercent = value;
     } while (false);
 
-	m_csKeyEntity.Clear();
-	spCenConfig->ReadConfigValue(GetEntityBase()->GetEntityName(),"KeyEntity", m_csKeyEntity);
+	m_csKeyEntity = "PinPad";
+	do {
+		CSimpleStringA value(true);
+		spCenConfig->ReadConfigValue(GetEntityBase()->GetEntityName(), "KeyEntity", value);
+		if (!value.IsNullOrEmpty()) m_csKeyEntity = value;
+	} while (false);
+
 
 	ifstream is;
-	
 	CSimpleStringA cfgPath(""),cfgXml("");
 	err = GetEntityBase()->GetFunction()->GetPath("cfg",cfgPath);
-	cfgXml = cfgPath + "/SelfCheckerProc.xml";
+	cfgXml = cfgPath + SPLIT_SLASH_STR + "SelfCheckerProc.xml";
 	ReadXmlFile(cfgXml);
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("cfgxml[%s]", cfgXml);
 

+ 1 - 1
Module/mod_selfchecker/mod_selfchecker.h

@@ -82,7 +82,7 @@ public:
 		m_csQueryStateEntity = "CardIssuer,CardSwiper,IDCertificate,PinPad,MediaController,CounterConnector";
 		CSmartPointer<IConfigInfo> spCenterConfig;
 		CSimpleStringA csQueryStateEntity(true);
-		///**TODO(Gifur@1/9/2023): 增加集中配置 */
+		///**TODO(Gifur@1/9/2023): 澧炲姞闆嗕腑閰嶇疆 */
 		ErrorCodeEnum eCfg = pFunc->OpenConfig(Config_CenterSetting, spCenterConfig);
         if (eCfg != Error_Succeed) {
             DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("open cfg file failed(%s)!", SpStrError(eCfg));

+ 32 - 34
Module/mod_upload/upload.cpp

@@ -99,41 +99,42 @@ static upload_dir_t *upload_dir_load(IEntityFunction *pEntityFunc, const char *d
 		macroZip["Debug"] = true;
 
 		ErrorCodeEnum Error = Error_Succeed;
+		if (macroPath.find(dir) == macroPath.end()) {
+			return updir;
+		}
 		str = macroPath[dir].c_str();
-		if (Error == Error_Succeed) 
-		{
+
+		INIT_LIST_HEAD(&updir->candidate_list);
+		CSimpleStringA strRealPath;
+		Error = expand_dir(pEntityFunc, (LPCSTR)str, strRealPath);
+		if (Error == Error_Succeed) {
 			INIT_LIST_HEAD(&updir->candidate_list);
-			CSimpleStringA strRealPath;
-			Error = expand_dir(pEntityFunc, (LPCSTR)str, strRealPath);
-			if (Error == Error_Succeed) 
-			{
-				INIT_LIST_HEAD(&updir->candidate_list);
-				updir->name = _strdup(dir);
-				updir->path = _strdup(strRealPath);
-				if (strcmp(dir, "Video") == 0) {
-					str = "$(LocalVideo)";
-                    updir->flags |= UPLOAD_FLAG_MOVEPATH;
-                    Error = expand_dir(pEntityFunc, str, strRealPath);
-                    if (Error != Error_Succeed) {
-                        return NULL;
-                    }
-                    updir->movepath = _strdup(strRealPath);
-				} else {
-					updir->flags |= UPLOAD_FLAG_AUTODELETE;
+			updir->name = _strdup(dir);
+			updir->path = _strdup(strRealPath);
+
+			if (strcmp(dir, "Video") == 0) {
+				str = "$(LocalVideo)";
+				updir->flags |= UPLOAD_FLAG_MOVEPATH;
+				Error = expand_dir(pEntityFunc, str, strRealPath);
+				if (Error != Error_Succeed) {
+					return NULL;
 				}
+				updir->movepath = _strdup(strRealPath);
+			} else {
+				updir->flags |= UPLOAD_FLAG_AUTODELETE;
+			}
 
-				if (macroZip.find(dir) != macroZip.end() && macroZip[dir]) {
-					updir->flags |= UPLOAD_FLAG_ZIP;
-				}
-				if (strcmp("SilverlightDebug", dir) == 0 || strcmp("Debug", dir) == 0) {
-					updir->silent_time = 86400;
-				} else {
-					updir->silent_time = 900;
-				}
-				updir->child_count_limitation = default_limitation;
-				updir->fileCount=0;//初始化设置为0
-				updir->fileLenSum=0;//初始化设置为0
+			if (macroZip.find(dir) != macroZip.end() && macroZip[dir]) {
+				updir->flags |= UPLOAD_FLAG_ZIP;
 			}
+			if (strcmp("SilverlightDebug", dir) == 0 || strcmp("Debug", dir) == 0) {
+				updir->silent_time = 86400;
+			} else {
+				updir->silent_time = 900;
+			}
+			updir->child_count_limitation = default_limitation;
+			updir->fileCount = 0;//初始化设置为0
+			updir->fileLenSum = 0;//初始化设置为0
 		}
 	}
 	return updir;
@@ -165,7 +166,6 @@ void updir_del_file(file_t *file)
 int upload_create(struct list_head *list, IEntityFunction *pEntityFunc, CSimpleStringA &checkDir)
 {
 	assert(list_empty(list));
-	ErrorCodeEnum Error;
 	char type_str[1024];
 	char *p, *c;
 	int default_silent_time = 0;
@@ -176,18 +176,16 @@ int upload_create(struct list_head *list, IEntityFunction *pEntityFunc, CSimpleS
     default_silent_time = 3600;
     default_limitation = 256;//最大文件数
 	p = strtok_s(type_str, ", ", &c);
-	
 	while (p) {
 		upload_dir_t *dir = upload_dir_load(pEntityFunc, p, default_silent_time, default_limitation);
 		if (!dir) 
 		{
 			return Error_Unexpect;
 		}
-		Dbg("load %s ok", p);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("upload_create")("load %s ok", p);
 		list_add_tail(&dir->entry, list);
 		p = strtok_s(NULL, ", ", &c);
 	}
-
 	return 0;
 }