Skip to content

Commit ab17eb0

Browse files
committed
Hardware Monitor (windows) now always starting worker thread for heartbeat message
1 parent ba45434 commit ab17eb0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

hardware/HardwareMonitor.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ bool CHardwareMonitor::StartHardware()
8080
StopHardware();
8181

8282
#ifdef WIN32
83-
if (!InitWMI())
84-
return false;
83+
InitWMI();
8584
#endif
86-
8785
m_stoprequested = false;
8886
m_lastquerytime = 0;
8987
m_thread = boost::shared_ptr<boost::thread>(new boost::thread(boost::bind(&CHardwareMonitor::Do_Work, this)));
@@ -361,6 +359,7 @@ void CHardwareMonitor::FetchData()
361359
RunWMIQuery("Sensor","Load");
362360
RunWMIQuery("Sensor","Fan");
363361
RunWMIQuery("Sensor","Voltage");
362+
return;
364363
}
365364
#elif defined __linux__
366365
_log.Log(LOG_NORM,"Hardware Monitor: Fetching data (System sensors)");
@@ -456,6 +455,8 @@ void CHardwareMonitor::ExitWMI()
456455

457456
bool CHardwareMonitor::IsOHMRunning()
458457
{
458+
if ((m_pServicesOHM == NULL) || (m_pServicesSystem == NULL))
459+
return false;
459460
bool bOHMRunning = false;
460461
IEnumWbemClassObject* pEnumerator = NULL;
461462
HRESULT hr;

msbuild/domoticz.sln

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "domoticz", "domoticz.vcxproj", "{6AD96441-5B2C-467B-AAB6-A1B8368D503A}"
77
EndProject
88
Global
9-
GlobalSection(Performance) = preSolution
10-
HasPerformanceSessions = true
11-
EndGlobalSection
129
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1310
Debug|Win32 = Debug|Win32
1411
Release|Win32 = Release|Win32

0 commit comments

Comments
 (0)