Changeset 3b8eb61 in nscp for trunk/modules/CheckSystem/PDHCollector.cpp
- Timestamp:
- 05/18/05 22:46:09 (8 years ago)
- Children:
- 7da80b5
- Parents:
- f896cfb
- File:
-
- 1 edited
-
trunk/modules/CheckSystem/PDHCollector.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/CheckSystem/PDHCollector.cpp
rae192e3 r3b8eb61 82 82 }while (!(WaitForSingleObject(hStopEvent_, checkIntervall_*100) == WAIT_OBJECT_0)); 83 83 84 if (!CloseHandle(hStopEvent_)) 85 NSC_LOG_ERROR_STD("Failed to close stopEvent handle: " + strEx::itos(GetLastError())); 86 else 87 hStopEvent_ = NULL; 88 try { 89 pdh.close(); 90 } catch (const PDH::PDHException &e) { 91 NSC_LOG_ERROR_STD("Failed to close performance counters: " + e.str_); 84 { 85 MutexLock mutex(mutexHandler); 86 if (!mutex.hasMutex()) { 87 NSC_LOG_ERROR("Failed to get Mute when closing thread!"); 88 } 89 90 if (!CloseHandle(hStopEvent_)) 91 NSC_LOG_ERROR_STD("Failed to close stopEvent handle: " + strEx::itos(GetLastError())); 92 else 93 hStopEvent_ = NULL; 94 try { 95 pdh.close(); 96 } catch (const PDH::PDHException &e) { 97 NSC_LOG_ERROR_STD("Failed to close performance counters: " + e.str_); 98 } 92 99 } 93 100 return 0; … … 99 106 */ 100 107 void PDHCollector::exitThread(void) { 108 MutexLock mutex(mutexHandler); 109 if (!mutex.hasMutex()) { 110 NSC_LOG_ERROR("Failed to get Mute when trying to close thread!"); 111 return; 112 } 101 113 if (hStopEvent_ == NULL) 102 NSC_LOG_ERROR("Failed to get Mutex!");114 NSC_LOG_ERROR("Failed to get stop event!"); 103 115 else 104 116 if (!SetEvent(hStopEvent_)) {
Note: See TracChangeset
for help on using the changeset viewer.








