Ignore:
Timestamp:
05/18/05 22:46:09 (8 years ago)
Author:
Michael Medin <michael@…>
Children:
7da80b5
Parents:
f896cfb
Message:

2005-05-18 MickeM

  • Fixed bug in NSC.ini (section title for Check System was wrong) + Added multitasking for plugins (now two plugins can handle requests simultaniously)
  • Fixed som minor issues here and there
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/CheckSystem/PDHCollector.cpp

    rae192e3 r3b8eb61  
    8282  }while (!(WaitForSingleObject(hStopEvent_, checkIntervall_*100) == WAIT_OBJECT_0)); 
    8383 
    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    } 
    9299  } 
    93100  return 0; 
     
    99106 */ 
    100107void 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  } 
    101113  if (hStopEvent_ == NULL) 
    102     NSC_LOG_ERROR("Failed to get Mutex!"); 
     114    NSC_LOG_ERROR("Failed to get stop event!"); 
    103115  else 
    104116    if (!SetEvent(hStopEvent_)) { 
Note: See TracChangeset for help on using the changeset viewer.