Browse Source

#IQRV #comment [Module] 健康实体优化语法

gifur 4 years ago
parent
commit
0fdd63a6c3
1 changed files with 12 additions and 8 deletions
  1. 12 8
      Module/mod_selfchecker/SelfCheckerFSM.cpp

+ 12 - 8
Module/mod_selfchecker/SelfCheckerFSM.cpp

@@ -761,26 +761,30 @@ void CSelfCheckerFSM::OnAnswer(CSmartPointer<IAsynWaitSp> pAsynWaitSp)
 	//Dbg("oiltest [%s]%d,%d,%d.",(LPCTSTR)new_entry->EntityName,m_entRunInfo[new_entry->EntityName].eState,m_entRunInfo[new_entry->EntityName].eTest,new_entry->ErrorResult);
 		
 	
-	if (new_entry->op == Test_ShakeHand && new_entry->ErrorResult != Error_Succeed)
-		Dbg("oiltmp shakehand %s,(r)%d,(state)%d",(LPCTSTR)new_entry->EntityName,new_entry->ErrorResult,new_entry->state);
+	if (new_entry->op == Test_ShakeHand && new_entry->ErrorResult != Error_Succeed) {
+		Dbg("oiltmp shakehand %s turns out %s, entity state: %s", 
+			(LPCTSTR)new_entry->EntityName, SpStrError(new_entry->ErrorResult), SpStrEntityState((EntityStateEnum)new_entry->state));
+	}
+		
 	if (new_entry->ErrorResult != Error_Succeed)
 	{
 		ErrorCodeEnum eErr;
 		CSmartPointer<IEntityFunction> pFunc = GetEntityBase()->GetFunction();
 		CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
+		//TODO(Gifur@20210507) Linux Platform has no IEBrowser!!
 		CEntityRunInfo ieInfo;
 		eErr = pFunc->GetEntityRunInfo("IEBrowser",ieInfo);
-		bool bIEStarted = false;
-		if (eErr == Error_Succeed && ieInfo.eState != EntityState_NoStart)
-			bIEStarted = true;
+		const bool bIEStarted = (eErr == Error_Succeed && ieInfo.eState != EntityState_NoStart);
+
 		if (_strnicmp("MediaController", (const char*)new_entry->EntityName, strlen("MediaController")) == 0
 			&& !bIEStarted)
 		{
 			Dbg("On loading stage,don't process MediaController exception.");
 		}
-		else
-			//ExceptionErrorProcess(new_entry->EntityName,new_entry->ErrorResult);
-			Proc((const char*)new_entry->EntityName,ProcType_Shake,new_entry->ErrorResult);
+		else {
+            //ExceptionErrorProcess(new_entry->EntityName,new_entry->ErrorResult);
+            Proc((const char*)new_entry->EntityName, ProcType_Shake, new_entry->ErrorResult);
+		}
 	}
 	else
 	{