Browse Source

Z991239-6163 #comment: 优化网卡检测、网络连通性检查的RTAxxxx上送逻辑为第一次才送,循环检查逻辑不变

oilyang 5 months ago
parent
commit
e62692087a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Module/mod_vtmloader/VtmLoaderFSM.cpp

+ 4 - 3
Module/mod_vtmloader/VtmLoaderFSM.cpp

@@ -933,11 +933,11 @@ int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
 	//GetEntityBase()->GetFunction()->GetSysVar("TerminalStage", tmpTS);
 	int netcheckCount = 1;
 	ULLINT ullTmpStart = SP::Module::Comm::RVCGetTickCount();
-
 		while (true)
 		{
 			if (!DetectNetworkLegality(strMsg)) {
-				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F10").setResultCode("RTA1F00")("can't find valid network interface");
+				if (netcheckCount == 1)//oilyang@20250415 only the first time we log RTAxxxx
+					DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F10").setResultCode("RTA1F00")("can't find valid network interface");
 				LogWarn(Severity_High, Error_Unexpect, VtmLoader_UserCode_NetCard_UnAvaible, CSimpleStringA::Format("%s。%d 秒后自动重试(第%d次重试)。请检查网线是否插好、网络是否正常"
 					, strMsg.GetData(), m_iDetectInterval / 1000, netcheckCount).GetData());
 				//if (tmpTS.Compare("E") != 0)
@@ -1873,7 +1873,8 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
 		if (!bCheckOK)
 		{
 			LogWarn(Severity_High, Error_Unexpect, VtmLoader_ConnectDetect_Failed, CSimpleStringA::Format("尝试连接总行服务失败(%s),%d 秒后自动重试(第%d次重试)。请确认终端到总行服务网络是否正常", csHttAddr.GetData(), m_iDetectInterval/1000, httpcheckCount).GetData());
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F11").setResultCode("RTA1F06")("connect to http(s) service(%s) failed.", csHttAddr.GetData());
+			if (httpcheckCount == 1)//oilyang@20250415 only the first time we log RTAxxxx
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F11").setResultCode("RTA1F06")("connect to http(s) service(%s) failed.", csHttAddr.GetData());
 			m_httpCheckResult[eType] = HttpConnResult_Failed;
 			Sleep(m_iDetectInterval);
 			httpcheckCount++;