浏览代码

交换判断顺序:
1、先重启
2、再关机

scbc.sat2 5 年之前
父节点
当前提交
31a60b6eee
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      LogModule/LogModule/LogModule.cpp

+ 10 - 10
LogModule/LogModule/LogModule.cpp

@@ -72,6 +72,16 @@ unsigned int __stdcall ThreadWathTVPort(PVOID pM)
 				buffer = (char*)szBuffer;
 				__time64_t gmt = time(NULL);// 获取当前日历时间(1900-01-01开始的Unix时间戳);
 				// 遍历是否有符合的子串;		
+				for ( std::vector<std::string>::iterator it = vtNotifyReboot.begin(); it != vtNotifyReboot.end(); it++ )
+				{
+					if ( _tcsstr(buffer.c_str(), it->c_str()) )
+					{
+						nType = 1;
+						bAbnormal = true;
+						break;
+					}
+				}
+
 				if ( !bAbnormal )
 				{
 					for ( std::vector<std::string>::iterator it = vtNotifyShutdown.begin(); it != vtNotifyShutdown.end(); it++ )
@@ -85,16 +95,6 @@ unsigned int __stdcall ThreadWathTVPort(PVOID pM)
 					}
 				}
 
-				for ( std::vector<std::string>::iterator it = vtNotifyReboot.begin(); it != vtNotifyReboot.end(); it++ )
-				{
-					if ( _tcsstr(buffer.c_str(), it->c_str()) )
-					{
-						nType = 1;
-						bAbnormal = true;
-						break;
-					}
-				}
-
 				// 1分钟前,是否有收到脚本通知;
 				if ( Global::g_notify.notify )
 				{