Ignore:
Timestamp:
10/26/06 07:03:39 (7 years ago)
Author:
Michael Medin <michael@…>
Children:
e47106e
Parents:
580389c3
Message:

* empty log message *

File:
1 edited

Legend:

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

    r8b89aba r8fcc179  
    120120 
    121121  DWORD waitStatus = 0; 
     122  bool first = true; 
    122123  do { 
    123124    MutexLock mutex(mutexHandler); 
     
    128129        pdh.gatherData(); 
    129130      } catch (const PDH::PDHException &e) { 
    130         NSC_LOG_ERROR_STD("Failed to query performance counters: " + e.getError()); 
     131        if (first) {  // If this is the first run an error will be thrown since the data is not yet avalible 
     132                // This is "ok" but perhaps another solution would be better, but this works :) 
     133          first = false; 
     134        } else { 
     135          NSC_LOG_ERROR_STD("Failed to query performance counters: " + e.getError()); 
     136        } 
    131137      } 
    132138    }  
Note: See TracChangeset for help on using the changeset viewer.