|
|
@@ -855,39 +855,38 @@ int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
|
|
|
{
|
|
|
//检查网卡状态
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to check network status");
|
|
|
- CSimpleStringA strMsg(true),tmpTS("X");
|
|
|
+ CSimpleStringA strMsg(true), tmpTS("X");
|
|
|
//GetEntityBase()->GetFunction()->GetSysVar("TerminalStage", tmpTS);
|
|
|
int netcheckCount = 1;
|
|
|
ULLINT ullTmpStart = SP::Module::Comm::RVCGetTickCount();
|
|
|
- while (true)
|
|
|
- {
|
|
|
- if (!DetectNetworkLegality(strMsg)) {
|
|
|
- //LogWarn(Severity_High, Error_Unexpect, VtmLoader_UserCode_NetCard_UnAvaible, strMsg.GetData());
|
|
|
- LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, strMsg.GetData());
|
|
|
- LogWarn(Severity_Low, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("%d 秒后自动重试(第%d次重试)。请检查网线是否插好、网络是否正常", m_iDetectInterval/1000, netcheckCount));
|
|
|
- //if (tmpTS.Compare("E") != 0)
|
|
|
- //{
|
|
|
- // GetEntityBase()->GetFunction()->SetSysVar("TerminalStage", "E");
|
|
|
- // tmpTS = "E";
|
|
|
- //}
|
|
|
- Sleep(5000);
|
|
|
- netcheckCount++;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- m_ullNetCardCost = (SP::Module::Comm::RVCGetTickCount() - ullTmpStart) / 1000;//second
|
|
|
- LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "网卡状态正常");
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F10")("network interface ok.");
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
//for rvc.pad only
|
|
|
if (!m_sysInfo.strTerminalID.IsNullOrEmpty() && m_sysInfo.strTerminalID.SubString(m_sysInfo.strTerminalID.GetLength() - 4, 1).Compare("5") == 0)
|
|
|
- {
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%s is pad,no network connection detect.", m_sysInfo.strTerminalID.GetData());
|
|
|
- }
|
|
|
else
|
|
|
{
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ if (!DetectNetworkLegality(strMsg)) {
|
|
|
+ //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));
|
|
|
+ //if (tmpTS.Compare("E") != 0)
|
|
|
+ //{
|
|
|
+ // GetEntityBase()->GetFunction()->SetSysVar("TerminalStage", "E");
|
|
|
+ // tmpTS = "E";
|
|
|
+ //}
|
|
|
+ Sleep(5000);
|
|
|
+ netcheckCount++;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_ullNetCardCost = (SP::Module::Comm::RVCGetTickCount() - ullTmpStart) / 1000;//second
|
|
|
+ LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "网卡状态正常");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F10")("network interface ok.");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
ullTmpStart = SP::Module::Comm::RVCGetTickCount();
|
|
|
//检查网络连通性(网络连通性是否作为关键路径走配置,默认不是关键路径)
|
|
|
if (!DetectHttpActive())
|