summaryrefslogtreecommitdiff
path: root/win/inspircd_win32wrapper.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-20 10:27:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-20 10:27:46 +0000
commit7721a4de678967c527c4887e036f7a93722296ed (patch)
tree020780a638ea81113dd35efbfd3aed7080e3b581 /win/inspircd_win32wrapper.cpp
parent1bdc61df779bbd74ca8641cde512dc0a1d8be4c0 (diff)
Checks to make sure that WMI initialises, if it doesnt we return -1 for CPU percentage
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10180 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'win/inspircd_win32wrapper.cpp')
-rw-r--r--win/inspircd_win32wrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp
index 37da9c0b3..62d9ff329 100644
--- a/win/inspircd_win32wrapper.cpp
+++ b/win/inspircd_win32wrapper.cpp
@@ -753,7 +753,7 @@ int getcpu()
&pEnumerator);
if (FAILED(hres))
- return 0;
+ return -1;
IWbemClassObject *pclsObj = NULL;
ULONG uReturn = 0;
@@ -790,5 +790,5 @@ int getcpu()
}
pEnumerator->Release();
pclsObj->Release();
- return 0;
+ return -1;
}