|
@@ -196,17 +196,6 @@ namespace Chromium {
|
|
|
|
|
|
switch (errType)
|
|
|
{
|
|
|
- /* 不应该有
|
|
|
- case ERR_PAGE_REASON::CardStoreIsBusy:
|
|
|
- errPagePath.Append(CSimpleStringA("?reason=") + errType._to_string() + "&errmsg=卡库正在使用中");
|
|
|
- setLimitReason(errType._to_string());
|
|
|
- break;
|
|
|
- case ERR_PAGE_REASON::MachineTypeError:
|
|
|
- errPagePath.Append(CSimpleStringA("?reason=") + errType._to_string() + "&errmsg=双屏版只检测到单屏");
|
|
|
- setLimitReason("breakdown");
|
|
|
- break;
|
|
|
- case ERR_PAGE_REASON::CameraConfig:
|
|
|
- */
|
|
|
case ERR_PAGE_REASON::breakdown:
|
|
|
{
|
|
|
CSimpleStringA m_sAuthErrMsg, ts;
|
|
@@ -219,8 +208,9 @@ namespace Chromium {
|
|
|
else
|
|
|
errPagePath.Append(CSimpleStringA("?reason=")).Append(errType._to_string()).Append("&errmsg=").Append(m_sAuthErrMsg);
|
|
|
|
|
|
- if (findRestartCode(usercode))
|
|
|
- errPagePath.Append("&reboottime=").Append(GetSpShellBootTime().c_str());
|
|
|
+ if (findRestartCode(usercode)) {
|
|
|
+ errPagePath.Append("&reboottime=").Append(GetSpShellNextRebootTime().c_str());
|
|
|
+ }
|
|
|
errPagePath.Append(CSimpleStringA("&showlimit=")).Append(std::to_string((unsigned long long)1).c_str());
|
|
|
if (m_withMin)
|
|
|
{
|
|
@@ -314,13 +304,15 @@ namespace Chromium {
|
|
|
std::string formatTime(SYSTEMTIME time)
|
|
|
{
|
|
|
char tBuf[1024] = "";
|
|
|
- sprintf(tBuf, "%04u-%02u-%02u %02u:%02u:%02u:%03u", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond, time.wMilliseconds);
|
|
|
+ //sprintf(tBuf, "%04u-%02u-%02u %02u:%02u:%02u:%03u", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond, time.wMilliseconds);
|
|
|
+ sprintf(tBuf, "%04u-%02u-%02u %02u:%02u:%02u", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond);
|
|
|
return tBuf;
|
|
|
}
|
|
|
|
|
|
- std::string CModTools::GetSpShellBootTime()
|
|
|
+ std::string CModTools::GetSpShellNextRebootTime()
|
|
|
{
|
|
|
static std::string shellBootTime;
|
|
|
+
|
|
|
if (0 == shellBootTime.length())
|
|
|
{
|
|
|
CAutoArray<CSimpleStringA> t_names;
|
|
@@ -329,9 +321,14 @@ namespace Chromium {
|
|
|
this->m_pEntity->GetFunction()->GetAllEntityStartInfo(t_names, t_Idx, t_Infos);
|
|
|
|
|
|
for (int i = 0; i < t_Infos.GetCount(); i++) {
|
|
|
- if (0 == t_Idx[i])//shell
|
|
|
- {
|
|
|
- shellBootTime = formatTime(t_Infos[i].startTime);
|
|
|
+ //if (0 == t_Idx[i])//shell
|
|
|
+ if (t_names[i].Compare("HealthManager") == 0) {
|
|
|
+ SYSTEMTIME startTime = t_Infos[i].startTime;
|
|
|
+ CSmallDateTime dateTime;
|
|
|
+ dateTime.FromSystemTime(startTime);
|
|
|
+ /** 十分钟后重启 [Gifur@2022324]*/
|
|
|
+ CSmallDateTime dateNewTime((DWORD)dateTime + 10 * 60);
|
|
|
+ shellBootTime = dateNewTime.ToTimeString().GetData();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -782,15 +779,15 @@ namespace Chromium {
|
|
|
else
|
|
|
{
|
|
|
//open err page
|
|
|
-
|
|
|
- if (notifyExist)
|
|
|
- return std::make_pair(Error_Unexpect, 0);
|
|
|
-
|
|
|
- if (ERR_PAGE_REASON::breakdown == reason._to_integral() && breakdownExist)
|
|
|
- return std::make_pair(Error_Unexpect, 0);//只打开一个breakdown页面,后续通过cefclient改动,避免打开同种页面
|
|
|
+ if (notifyExist) {
|
|
|
+ return std::make_pair(Error_Duplication, 0);
|
|
|
+ }
|
|
|
+ //只打开一个breakdown页面,后续通过cefclient改动,避免打开同种页面
|
|
|
+ if (ERR_PAGE_REASON::breakdown == reason._to_integral() && breakdownExist) {
|
|
|
+ return std::make_pair(Error_Duplication, 0);
|
|
|
+ }
|
|
|
|
|
|
auto errPageUrl = GenerateErrPage(reason, normalParam, exParam);
|
|
|
-
|
|
|
if (!errPageUrl.first)
|
|
|
{
|
|
|
DbgEx("errPage get url failed!");
|
|
@@ -990,8 +987,11 @@ namespace Chromium {
|
|
|
}
|
|
|
|
|
|
bool CModTools::findRestartCode(DWORD userCode) {
|
|
|
+
|
|
|
+ /** 救赎之道,就在其外 [Gifur@2022324]*/
|
|
|
DWORD authArr_noretry_norestart[] = ERRARR_ACCESSAUTH_NORETRY_NORESTART;
|
|
|
DWORD authArr_retry_norestart[] = ERRARR_ACCESSAUTH_RETRY_NORESTART;
|
|
|
+
|
|
|
std::vector<DWORD> norestartArr;
|
|
|
#if (defined _WIN32 || defined _WIN64)
|
|
|
for each (auto i in authArr_noretry_norestart)
|
|
@@ -999,6 +999,7 @@ namespace Chromium {
|
|
|
for (auto i : authArr_noretry_norestart)
|
|
|
#endif
|
|
|
norestartArr.push_back(i);
|
|
|
+
|
|
|
#if (defined _WIN32 || defined _WIN64)
|
|
|
for each (auto i in authArr_retry_norestart)
|
|
|
#else
|
|
@@ -1006,6 +1007,8 @@ namespace Chromium {
|
|
|
#endif
|
|
|
norestartArr.push_back(i);
|
|
|
|
|
|
+//////////////////////////////////////////////////////////////////////////
|
|
|
+
|
|
|
#if (defined _WIN32 || defined _WIN64)
|
|
|
for each (auto i in norestartArr)
|
|
|
#else
|
|
@@ -1016,6 +1019,7 @@ namespace Chromium {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|