Changeset 2603350 in nscp


Ignore:
Timestamp:
02/23/07 19:25:23 (6 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
2c34b97
Parents:
d48c31a
Message:

Getting ready for the 0.2.7 release, a few minor fixes here and there...

Files:
27 edited

Legend:

Unmodified
Added
Removed
  • NSClient++.cpp

    r1a22e52 r2603350  
    380380      switch (c) { 
    381381        case NSCAPI::returnInvalidBufferLen: 
    382           LOG_ERROR("Return buffer to small to handle this command."); 
     382          LOG_ERROR("UNKNOWN: Return buffer to small to handle this command."); 
    383383          return c; 
    384384        case NSCAPI::returnIgnored: 
     
    521521  return NSCAPI::isSuccess; 
    522522} 
     523NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(char*** aBuffer, unsigned int * bufLen) { 
     524  arrayBuffer::destroyArrayBuffer(*aBuffer, *bufLen); 
     525  *bufLen = 0; 
     526  *aBuffer = NULL; 
     527  return NSCAPI::isSuccess; 
     528} 
    523529 
    524530NSCAPI::boolReturn NSAPICheckLogMessages(int messageType) { 
     
    651657 
    652658LPVOID NSAPILoader(char*buffer) { 
    653   if (stricmp(buffer, "NSAPIGetApplicationName") == 0) 
     659  if (_stricmp(buffer, "NSAPIGetApplicationName") == 0) 
    654660    return &NSAPIGetApplicationName; 
    655   if (stricmp(buffer, "NSAPIGetApplicationVersionStr") == 0) 
     661  if (_stricmp(buffer, "NSAPIGetApplicationVersionStr") == 0) 
    656662    return &NSAPIGetApplicationVersionStr; 
    657   if (stricmp(buffer, "NSAPIGetSettingsSection") == 0) 
     663  if (_stricmp(buffer, "NSAPIGetSettingsString") == 0) 
     664    return &NSAPIGetSettingsString; 
     665  if (_stricmp(buffer, "NSAPIGetSettingsSection") == 0) 
    658666    return &NSAPIGetSettingsSection; 
    659   if (stricmp(buffer, "NSAPIGetSettingsString") == 0) 
    660     return &NSAPIGetSettingsString; 
    661   if (stricmp(buffer, "NSAPIGetSettingsInt") == 0) 
     667  if (_stricmp(buffer, "NSAPIReleaseSettingsSectionBuffer") == 0) 
     668    return &NSAPIReleaseSettingsSectionBuffer; 
     669  if (_stricmp(buffer, "NSAPIGetSettingsInt") == 0) 
    662670    return &NSAPIGetSettingsInt; 
    663   if (stricmp(buffer, "NSAPIMessage") == 0) 
     671  if (_stricmp(buffer, "NSAPIMessage") == 0) 
    664672    return &NSAPIMessage; 
    665   if (stricmp(buffer, "NSAPIStopServer") == 0) 
     673  if (_stricmp(buffer, "NSAPIStopServer") == 0) 
    666674    return &NSAPIStopServer; 
    667   if (stricmp(buffer, "NSAPIInject") == 0) 
     675  if (_stricmp(buffer, "NSAPIInject") == 0) 
    668676    return &NSAPIInject; 
    669   if (stricmp(buffer, "NSAPIGetBasePath") == 0) 
     677  if (_stricmp(buffer, "NSAPIGetBasePath") == 0) 
    670678    return &NSAPIGetBasePath; 
    671   if (stricmp(buffer, "NSAPICheckLogMessages") == 0) 
     679  if (_stricmp(buffer, "NSAPICheckLogMessages") == 0) 
    672680    return &NSAPICheckLogMessages; 
    673   if (stricmp(buffer, "NSAPIEncrypt") == 0) 
     681  if (_stricmp(buffer, "NSAPIEncrypt") == 0) 
    674682    return &NSAPIEncrypt; 
    675   if (stricmp(buffer, "NSAPIDecrypt") == 0) 
     683  if (_stricmp(buffer, "NSAPIDecrypt") == 0) 
    676684    return &NSAPIDecrypt; 
    677   if (stricmp(buffer, "NSAPISetSettingsString") == 0) 
     685  if (_stricmp(buffer, "NSAPISetSettingsString") == 0) 
    678686    return &NSAPISetSettingsString; 
    679   if (stricmp(buffer, "NSAPISetSettingsInt") == 0) 
     687  if (_stricmp(buffer, "NSAPISetSettingsInt") == 0) 
    680688    return &NSAPISetSettingsInt; 
    681   if (stricmp(buffer, "NSAPIWriteSettings") == 0) 
     689  if (_stricmp(buffer, "NSAPIWriteSettings") == 0) 
    682690    return &NSAPIWriteSettings; 
    683   if (stricmp(buffer, "NSAPIReadSettings") == 0) 
     691  if (_stricmp(buffer, "NSAPIReadSettings") == 0) 
    684692    return &NSAPIReadSettings; 
    685   if (stricmp(buffer, "NSAPIRehash") == 0) 
     693  if (_stricmp(buffer, "NSAPIRehash") == 0) 
    686694    return &NSAPIRehash; 
    687695  return NULL; 
  • NSClient++.h

    r1a22e52 r2603350  
    100100NSCAPI::nagiosReturn NSAPIInject(const char* command, const unsigned int argLen, char **argument, char *returnMessageBuffer, unsigned int returnMessageBufferLen, char *returnPerfBuffer, unsigned int returnPerfBufferLen); 
    101101NSCAPI::errorReturn NSAPIGetSettingsSection(const char*, char***, unsigned int *); 
     102NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(char*** aBuffer, unsigned int * bufLen); 
    102103NSCAPI::boolReturn NSAPICheckLogMessages(int messageType); 
    103104NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const char* inBuffer, unsigned int inBufLen, char* outBuf, unsigned int *outBufLen); 
  • changelog

    rd48c31a r2603350  
    33 * Fix configuration GUI (low priority) 
    44 * Fix installer (after configuration UI) 
    5  * Service check to use Auto (filter by started setting etc.) 
    65 * Add module for relaying events 
    76 * Add filtering to WMI module 
     
    109 * Add API for rehashing the daemon (or implement it the API is there but does nothing) 
    1110 * Add option to recheck DNS in real time 
     11 
     122006-02-22 MickeM 
     13 + Added debug output to see if the socket is bound and/or has shutdown. 
     14 * Fixed a potential bug in the threadmanager. 
     15 + Added configuration option for suppressing performance datat to the NRPE section. 
     16   Set performance_data=0 to stop sendoing performancedata to nagios 
     17 + New (better?) (simpler?) eventlog checking 
     18 + Added option to most commands (ignore-perf-data) to suppres performance data 
     19 + Added option CheckAll for checking all auto-start services to checkServiceState. 
     20   Also an exclude=<service> to exclude checking that. 
     21 * Fixed return syntax for PROCSTATE nsclient 
     22 
     232006-02-21 MickeM 
     24 * Fixed "broken password check" (again) in NSClient listener (this time it is correct! :) 
    1225 
    13262006-12-02 MickeM 
  • include/NSCHelper.cpp

    r76aafc4 r2603350  
    102102  lpNSAPIGetApplicationVersionStr fNSAPIGetApplicationVersionStr = NULL; 
    103103  lpNSAPIGetSettingsSection fNSAPIGetSettingsSection = NULL; 
     104  lpNSAPIReleaseSettingsSectionBuffer fNSAPIReleaseSettingsSectionBuffer = NULL; 
    104105  lpNSAPIGetSettingsString fNSAPIGetSettingsString = NULL; 
    105106  lpNSAPIGetSettingsInt fNSAPIGetSettingsInt = NULL; 
     
    289290  if (!fNSAPIGetSettingsSection) 
    290291    throw NSCMHExcpetion("NSCore has not been initiated..."); 
    291   char ** aBuffer = NULL; 
     292  arrayBuffer::arrayBuffer aBuffer = NULL; 
    292293  unsigned int argLen = 0; 
    293294  if (fNSAPIGetSettingsSection(section.c_str(), &aBuffer, &argLen) != NSCAPI::isSuccess) { 
     
    295296  } 
    296297  std::list<std::string> ret = arrayBuffer::arrayBuffer2list(argLen, aBuffer); 
    297   arrayBuffer::destroyArrayBuffer(aBuffer, argLen); 
     298  if (fNSAPIReleaseSettingsSectionBuffer(&aBuffer, &argLen) != NSCAPI::isSuccess) { 
     299    throw NSCMHExcpetion("Settings could not be destroyed."); 
     300  } 
     301  assert(aBuffer == NULL); 
    298302  return ret; 
    299303} 
     
    502506  NSCModuleHelper::fNSAPIGetSettingsString = (NSCModuleHelper::lpNSAPIGetSettingsString)f("NSAPIGetSettingsString"); 
    503507  NSCModuleHelper::fNSAPIGetSettingsSection = (NSCModuleHelper::lpNSAPIGetSettingsSection)f("NSAPIGetSettingsSection"); 
     508  NSCModuleHelper::fNSAPIReleaseSettingsSectionBuffer = (NSCModuleHelper::lpNSAPIReleaseSettingsSectionBuffer)f("NSAPIReleaseSettingsSectionBuffer"); 
    504509  NSCModuleHelper::fNSAPIMessage = (NSCModuleHelper::lpNSAPIMessage)f("NSAPIMessage"); 
    505510  NSCModuleHelper::fNSAPIStopServer = (NSCModuleHelper::lpNSAPIStopServer)f("NSAPIStopServer"); 
     
    521526* @param bufLen Length of buffer 
    522527* @param str String to store inside the buffer 
    523 * @return buffer copy status 
     528* @  copy status 
    524529*/ 
    525530NSCAPI::errorReturn NSCModuleWrapper::wrapGetModuleName(char* buf, unsigned int bufLen, std::string str) { 
  • include/NSCHelper.h

    r76aafc4 r2603350  
    7979  typedef NSCAPI::errorReturn (*lpNSAPIGetSettingsString)(const char*,const char*,const char*,char*,unsigned int); 
    8080  typedef NSCAPI::errorReturn (*lpNSAPIGetSettingsInt)(const char*, const char*, int); 
    81   typedef NSCAPI::errorReturn (*lpNSAPIGetSettingsSection)(const char*, char***, unsigned int *); 
     81  typedef NSCAPI::errorReturn (*lpNSAPIGetSettingsSection)(const char*, arrayBuffer::arrayBuffer*, unsigned int *); 
     82  typedef NSCAPI::errorReturn (*lpNSAPIReleaseSettingsSectionBuffer)(arrayBuffer::arrayBuffer*, unsigned int *); 
    8283  typedef void (*lpNSAPIMessage)(int, const char*, const int, const char*); 
    8384  typedef NSCAPI::errorReturn (*lpNSAPIStopServer)(void); 
  • include/Socket.h

    r0687108 r2603350  
    103103      return ::inet_addr(addr.c_str()); 
    104104    } 
     105    static std::string inet_ntoa(unsigned long addr) { 
     106      struct in_addr a; 
     107      a.S_un.S_addr = addr; 
     108      return ::inet_ntoa(a); 
     109    } 
    105110    static std::string getHostByName(std::string ip) { 
    106111      hostent* remoteHost; 
     
    109114        throw SocketException("gethostbyname failed for " + ip + ": ", ::WSAGetLastError()); 
    110115      // @todo investigate it this is "correct" and dont use before! 
    111       return inet_ntoa(*reinterpret_cast<in_addr*>(remoteHost->h_addr)); 
     116      return ::inet_ntoa(*reinterpret_cast<in_addr*>(remoteHost->h_addr)); 
    112117    } 
    113118    static std::string getHostByAddr(std::string ip) { 
     
    165170    } 
    166171    virtual std::string getAddrString() { 
    167       return inet_ntoa(from_.sin_addr); 
     172      return ::inet_ntoa(from_.sin_addr); 
    168173    } 
    169174    virtual void printError(std::string file, int line, std::string error); 
     
    424429    core->setAddr(AF_INET, core->bindAddres_, htons(core->bindPort_)); 
    425430    core->bind(); 
     431    NSC_DEBUG_MSG_STD("Bound to: " + TListenerType::inet_ntoa(core->bindAddres_) + ":" + strEx::itos(core->bindPort_)); 
    426432    if (core->listenQue_ != 0) 
    427433      core->listen(core->listenQue_); 
     
    429435      core->listen(); 
    430436    core->setNonBlock(); 
     437    NSC_DEBUG_MSG_STD("Socket ready..."); 
    431438    while (!(WaitForSingleObject(hStopEvent_, 100) == WAIT_OBJECT_0)) { 
    432439      try { 
     
    442449    core->printError(__FILE__, __LINE__, e.getMessage()); 
    443450  } 
     451  NSC_DEBUG_MSG_STD("Listener is preparing to shutdown..."); 
    444452  core->shutdown(SD_BOTH); 
    445453  core->close(); 
  • include/arrayBuffer.cpp

    r9ce8b01 r2603350  
    2727* @return A pointer that is managed by the caller. 
    2828*/ 
    29 char ** arrayBuffer::list2arrayBuffer(const arrayList lst, unsigned int &argLen) { 
     29arrayBuffer::arrayBuffer arrayBuffer::list2arrayBuffer(const arrayList lst, unsigned int &argLen) { 
    3030  argLen = static_cast<unsigned int>(lst.size()); 
    31   char **arrayBuffer = new char*[argLen]; 
     31  arrayBuffer::arrayBuffer arrayBuffer = new arrayBuffer::arrayBufferItem[argLen]; 
    3232  arrayList::const_iterator it = lst.begin(); 
    3333  int i; 
     
    4545* @return The arrayBuffer 
    4646*/ 
    47 char ** arrayBuffer::createEmptyArrayBuffer(unsigned int &argLen) { 
     47arrayBuffer::arrayBuffer arrayBuffer::createEmptyArrayBuffer(unsigned int &argLen) { 
    4848  argLen = 0; 
    49   char **arrayBuffer = new char*[0]; 
     49  arrayBuffer::arrayBuffer arrayBuffer = new arrayBuffer::arrayBufferItem[0]; 
    5050  return arrayBuffer; 
    5151} 
     
    5757* @return The joined arrayBuffer 
    5858*/ 
    59 std::string arrayBuffer::arrayBuffer2string(char **argument, const unsigned int argLen, std::string join) { 
     59std::string arrayBuffer::arrayBuffer2string(arrayBuffer::arrayBuffer argument, const unsigned int argLen, std::string join) { 
    6060  std::string ret; 
    6161  for (unsigned int i=0;i<argLen;i++) { 
     
    7373* @return The arrayBuffer 
    7474*/ 
    75 char ** arrayBuffer::split2arrayBuffer(const char* buffer, char splitChar, unsigned int &argLen) { 
     75arrayBuffer::arrayBuffer arrayBuffer::split2arrayBuffer(const char* buffer, char splitChar, unsigned int &argLen) { 
    7676  assert(buffer); 
    7777  argLen = 0; 
     
    105105 * @return The arrayBuffer 
    106106 */ 
    107 char ** arrayBuffer::split2arrayBuffer(const std::string inBuf, char splitChar, unsigned int &argLen) { 
     107arrayBuffer::arrayBuffer arrayBuffer::split2arrayBuffer(const std::string inBuf, char splitChar, unsigned int &argLen) { 
    108108  if (inBuf.empty()) 
    109109    return createEmptyArrayBuffer(argLen); 
     
    115115    p = inBuf.find(splitChar, p+1); 
    116116  } 
    117   char **arrayBuffer = new char*[argLen]; 
     117  arrayBuffer::arrayBuffer arrayBuffer = new arrayBuffer::arrayBufferItem[argLen]; 
    118118  p = inBuf.find(splitChar); 
    119119  std::string::size_type l = 0; 
     
    139139* @param argLen  
    140140*/ 
    141 void arrayBuffer::destroyArrayBuffer(char **argument, const unsigned int argLen) { 
     141void arrayBuffer::destroyArrayBuffer(arrayBuffer::arrayBuffer argument, const unsigned int argLen) { 
    142142  for (unsigned int i=0;i<argLen;i++) { 
    143143    delete [] argument[i]; 
  • include/arrayBuffer.h

    r1e62ed5 r2603350  
    2626 */ 
    2727namespace arrayBuffer { 
     28  typedef char* arrayBufferItem; 
     29  typedef arrayBufferItem* arrayBuffer; 
    2830  typedef std::list<std::string> arrayList; 
    2931  arrayList arrayBuffer2list(const unsigned int argLen, char **argument); 
    30   char ** list2arrayBuffer(const arrayList lst, unsigned int &argLen); 
    31   char ** split2arrayBuffer(const char* buffer, char splitChar, unsigned int &argLen); 
    32   char ** split2arrayBuffer(const std::string buffer, char splitChar, unsigned int &argLen); 
     32  arrayBuffer list2arrayBuffer(const arrayList lst, unsigned int &argLen); 
     33  arrayBuffer split2arrayBuffer(const char* buffer, char splitChar, unsigned int &argLen); 
     34  arrayBuffer split2arrayBuffer(const std::string buffer, char splitChar, unsigned int &argLen); 
    3335  std::string arrayBuffer2string(char **argument, const unsigned int argLen, std::string join); 
    34   char ** createEmptyArrayBuffer(unsigned int &argLen); 
    35   void destroyArrayBuffer(char **argument, const unsigned int argLen); 
     36  arrayBuffer createEmptyArrayBuffer(unsigned int &argLen); 
     37  void destroyArrayBuffer(arrayBuffer argument, const unsigned int argLen); 
    3638 
    3739#ifdef _DEBUG 
  • include/checkHelpers.hpp

    r6817602 r2603350  
    5454 
    5555    showType show; 
    56  
    57  
    58     CheckConatiner() : show(showUnknown) 
     56    bool perfData; 
     57 
     58 
     59    CheckConatiner() : show(showUnknown), perfData(true) 
    5960    {} 
    6061    CheckConatiner(std::string data_, TContents warn_, TContents crit_)  
     
    9798        tstr = getAlias() + ": " + TContents::toStringShort(value); 
    9899      } 
    99       perf += gatherPerfData(value); 
     100      if (perfData) 
     101        perf += gatherPerfData(value); 
    100102      if (!message.empty() && !tstr.empty()) 
    101103        message += ", "; 
     
    671673  typedef MaxMinBounds<NumericBounds<int, int_handler> > MaxMinBoundsInteger; 
    672674  typedef MaxMinBounds<NumericBounds<unsigned int, int_handler> > MaxMinBoundsUInteger; 
     675  typedef MaxMinBounds<NumericBounds<unsigned long int, int_handler> > MaxMinBoundsULongInteger; 
    673676  typedef MaxMinBounds<NumericBounds<disk_size_type, disk_size_handler<disk_size_type> > > MaxMinBoundsDiscSize; 
    674677  typedef MaxMinBounds<NumericBounds<time_type, time_handler<time_type> > > MaxMinBoundsTime; 
  • include/config.h

    r0687108 r2603350  
    55 
    66// Version 
    7 #define SZVERSION "0.2.6 2006-11-18" 
     7#define SZVERSION "0.2.7 2007-02-22" 
    88 
    99// internal name of the service 
     
    3131#define SHOW_FAIL "ShowFail" 
    3232#define NSCLIENT "nsclient" 
     33#define IGNORE_PERFDATA "ignore-perf-data" 
    3334#define CHECK_ALL "CheckAll" 
    3435#define CHECK_ALL_OTHERS "CheckAllOthers" 
     
    6263#define NRPE_SETTINGS_LISTENQUE "socket_back_log" 
    6364#define NRPE_SETTINGS_LISTENQUE_DEFAULT 0 
     65#define NRPE_SETTINGS_PERFDATA "performance_data" 
     66#define NRPE_SETTINGS_PERFDATA_DEFAULT 1 
    6467 
    6568// Check System Settings 
  • include/thread.h

    r0687108 r2603350  
    182182      throw ThreadException("Could not retrieve mutex, thread (" + threadid_ + ") not stopped..."); 
    183183    } 
     184    if (bThreadHasTerminated||bThreadHasBeenClosed) 
     185      return false; 
    184186    return pObject_ != NULL; 
    185187  } 
     
    189191      throw ThreadException("Could not retrieve mutex, thread (" + threadid_ + ") not stopped..."); 
    190192    } 
     193    if (bThreadHasTerminated||bThreadHasBeenClosed) 
     194      return NULL; 
    191195    return pObject_; 
    192196  } 
     
    196200      throw ThreadException("Could not retrieve mutex, thread (" + threadid_ + ") not stopped..."); 
    197201    } 
     202    if (bThreadHasTerminated||bThreadHasBeenClosed) 
     203      return NULL; 
    198204    return pObject_; 
    199205  } 
  • include/utils.h

    r6817602 r2603350  
    4040#define MAP_OPTIONS_PUSH(value, list) \ 
    4141      else if (p__.first == value) { list.push_back(p__.second); } 
     42#define MAP_OPTIONS_INSERT(value, list) \ 
     43      else if (p__.first == value) { list.insert(p__.second); } 
    4244#define MAP_OPTIONS_DO(action) \ 
    4345      else if (p__.first == value) { action; } 
  • modules/CheckDisk/CheckDisk.cpp

    rd48c31a r2603350  
    103103  bool bCheckAllOthers = false; 
    104104  bool bNSClient = false; 
     105  bool bPerfData = true; 
    105106  std::list<DriveConatiner> drives; 
    106107 
     
    113114    MAP_OPTIONS_BOOL_VALUE("FilterType", bFilterRemovable, "REMOVABLE") 
    114115    MAP_OPTIONS_BOOL_VALUE("FilterType", bFilterRemote, "REMOTE") 
     116    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    115117    MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 
    116118    MAP_OPTIONS_BOOL_TRUE(CHECK_ALL, bCheckAll) 
     
    183185    if (drive.data.length() == 1) 
    184186      drive.data += ":"; 
     187    if (!bPerfData) 
     188      drive.perfData = false; 
    185189    UINT drvType = GetDriveType(drive.data.c_str()); 
    186190 
     
    231235  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    232236  std::list<std::string> args = arrayBuffer::arrayBuffer2list(argLen, char_args); 
     237  bool bPerfData = true; 
    233238  if (args.empty()) { 
    234239    message = "Missing argument(s)."; 
     
    245250    MAP_OPTIONS_STR("MaxCrit", tmpObject.crit.max) 
    246251    MAP_OPTIONS_STR("MinCrit", tmpObject.crit.min) 
     252    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    247253    MAP_OPTIONS_SECONDARY_BEGIN(":", p2) 
    248254    else if (p2.first == "File") { 
     
    263269    recursive_scan<get_size>(path.data, sizeFinder); 
    264270    path.setDefault(tmpObject); 
     271    if (!bPerfData) 
     272      path.perfData = false; 
    265273 
    266274    checkHolders::disk_size_type size = sizeFinder.getSize(); 
     
    456464  CheckFileConatiner query; 
    457465  std::string syntax = "%filename%"; 
     466  bool bPerfData = true; 
    458467 
    459468  try { 
     
    461470      MAP_OPTIONS_NUMERIC_ALL(query, "") 
    462471      MAP_OPTIONS_STR2INT("truncate", truncate) 
     472      MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    463473      MAP_OPTIONS_STR("syntax", syntax) 
    464474      MAP_OPTIONS_PUSH("path", paths) 
  • modules/CheckEventLog/CheckEventLog.cpp

    rf42280d r2603350  
    193193 
    194194 
    195 #define MAP_FILTER(value, obj) \ 
    196       else if (p__.first == value) { eventlog_filter filter; filter.obj = p__.second; filter_chain.push_back(filter); } 
     195#define MAP_FILTER(value, obj, filtermode) \ 
     196      else if (p__.first == value) { eventlog_filter filter; filter.obj = p__.second; filter_chain.push_back(filteritem_type(filtermode, filter)); } 
    197197 
    198198 
     
    201201  if (command != "CheckEventLog") 
    202202    return NSCAPI::returnIgnored; 
    203   typedef checkHolders::CheckConatiner<checkHolders::MaxMinBoundsUInteger> EventLogQueryConatiner; 
     203  typedef checkHolders::CheckConatiner<checkHolders::MaxMinBoundsULongInteger> EventLogQueryConatiner; 
     204  typedef std::pair<int,eventlog_filter> filteritem_type; 
     205  typedef std::list<filteritem_type > filterlist_type; 
    204206  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    205207  std::list<std::string> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 
    206208 
    207209  std::list<std::string> files; 
    208   std::list<eventlog_filter> filter_chain; 
     210  filterlist_type filter_chain; 
    209211  EventLogQueryConatiner query; 
    210212 
     213  bool bPerfData = true; 
    211214  bool bFilterIn = true; 
    212215  bool bFilterAll = false; 
     216  bool bFilterNew = false; 
    213217  bool bShowDescriptions = false; 
    214218  unsigned int truncate = 0; 
    215219  std::string syntax; 
     220  const int filter_plus = 1; 
     221  const int filter_minus = 2; 
     222  const int filter_normal = 3; 
     223  const int filter_compat = 3; 
    216224 
    217225  try { 
     
    221229      MAP_OPTIONS_BOOL_TRUE("descriptions", bShowDescriptions) 
    222230      MAP_OPTIONS_PUSH("file", files) 
     231      MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
     232      MAP_OPTIONS_BOOL_EX("filter", bFilterNew, "new", "old") 
    223233      MAP_OPTIONS_BOOL_EX("filter", bFilterIn, "in", "out") 
    224234      MAP_OPTIONS_BOOL_EX("filter", bFilterAll, "all", "any") 
    225235      MAP_OPTIONS_STR("syntax", syntax) 
    226       MAP_FILTER("filter-eventType", eventType) 
    227       MAP_FILTER("filter-severity", eventSeverity) 
    228       MAP_FILTER("filter-eventID", eventID) 
    229       MAP_FILTER("filter-eventSource", eventSource) 
    230       MAP_FILTER("filter-generated", timeGenerated) 
    231       MAP_FILTER("filter-written", timeWritten) 
    232       MAP_FILTER("filter-message", message) 
     236/* 
     237      MAP_FILTER_OLD("filter-eventType", eventType) 
     238      MAP_FILTER_OLD("filter-severity", eventSeverity) 
     239      MAP_FILTER_OLD("filter-eventID", eventID) 
     240      MAP_FILTER_OLD("filter-eventSource", eventSource) 
     241      MAP_FILTER_OLD("filter-generated", timeGenerated) 
     242      MAP_FILTER_OLD("filter-written", timeWritten) 
     243      MAP_FILTER_OLD("filter-message", message) 
     244*/ 
     245      MAP_FILTER("filter+eventType", eventType, filter_plus) 
     246      MAP_FILTER("filter+severity", eventSeverity, filter_plus) 
     247      MAP_FILTER("filter+eventID", eventID, filter_plus) 
     248      MAP_FILTER("filter+eventSource", eventSource, filter_plus) 
     249      MAP_FILTER("filter+generated", timeGenerated, filter_plus) 
     250      MAP_FILTER("filter+written", timeWritten, filter_plus) 
     251      MAP_FILTER("filter+message", message, filter_plus) 
     252 
     253      MAP_FILTER("filter.eventType", eventType, filter_normal) 
     254      MAP_FILTER("filter.severity", eventSeverity, filter_normal) 
     255      MAP_FILTER("filter.eventID", eventID, filter_normal) 
     256      MAP_FILTER("filter.eventSource", eventSource, filter_normal) 
     257      MAP_FILTER("filter.generated", timeGenerated, filter_normal) 
     258      MAP_FILTER("filter.written", timeWritten, filter_normal) 
     259      MAP_FILTER("filter.message", message, filter_normal) 
     260 
     261      MAP_FILTER("filter-eventType", eventType, filter_minus) 
     262      MAP_FILTER("filter-severity", eventSeverity, filter_minus) 
     263      MAP_FILTER("filter-eventID", eventID, filter_minus) 
     264      MAP_FILTER("filter-eventSource", eventSource, filter_minus) 
     265      MAP_FILTER("filter-generated", timeGenerated, filter_minus) 
     266      MAP_FILTER("filter-written", timeWritten, filter_minus) 
     267      MAP_FILTER("filter-message", message, filter_minus) 
     268 
    233269      MAP_OPTIONS_MISSING(message, "Unknown argument: ") 
    234270    MAP_OPTIONS_END() 
     
    241277  } 
    242278 
    243   unsigned int hit_count = 0; 
     279  unsigned long int hit_count = 0; 
    244280 
    245281  for (std::list<std::string>::const_iterator cit2 = files.begin(); cit2 != files.end(); ++cit2) { 
     
    250286    } 
    251287 
    252     DWORD dwThisRecord, dwRead, dwNeeded; 
     288    //DWORD dwThisRecord; 
     289    DWORD dwRead, dwNeeded; 
    253290    EVENTLOGRECORD *pevlr; 
    254291    BYTE bBuffer[BUFFER_SIZE];  
     
    259296    _time64(&ltime); 
    260297 
    261     GetOldestEventLogRecord(hLog, &dwThisRecord); 
     298    //GetOldestEventLogRecord(hLog, &dwThisRecord); 
    262299 
    263300    while (ReadEventLog(hLog, EVENTLOG_FORWARDS_READ|EVENTLOG_SEQUENTIAL_READ, 
     
    269306        EventLogRecord record(pevlr, ltime); 
    270307 
    271         for (std::list<eventlog_filter>::const_iterator cit3 = filter_chain.begin(); cit3 != filter_chain.end(); ++cit3 ) { 
    272           bool bTmpMatched = (*cit3).matchFilter(record); 
    273           if (bFilterAll) { 
    274             if (!bTmpMatched) { 
     308        for (filterlist_type::const_iterator cit3 = filter_chain.begin(); cit3 != filter_chain.end(); ++cit3 ) { 
     309          int mode = (*cit3).first; 
     310          bool bTmpMatched = (*cit3).second.matchFilter(record); 
     311          if (!bFilterNew) { 
     312            if (bFilterAll) { 
     313              if (!bTmpMatched) { 
     314                bMatch = false; 
     315                break; 
     316              } 
     317            } else { 
     318              if (bTmpMatched) { 
     319                bMatch = true; 
     320                break; 
     321              } 
     322            } 
     323          } else { 
     324            if ((mode == filter_minus)&&(bTmpMatched)) { 
     325              // a -<filter> hit so thrash item and bail out! 
    275326              bMatch = false; 
    276327              break; 
    277             } 
    278           } else { 
    279             if (bTmpMatched) { 
     328            } else if ((mode == filter_plus)&&(!bTmpMatched)) { 
     329                // a +<filter> missed hit so thrash item and bail out! 
     330                bMatch = false; 
     331                break; 
     332            } else if (bTmpMatched) { 
    280333              bMatch = true; 
    281               break; 
    282334            } 
    283335          } 
    284336        } 
    285  
    286         if ((bFilterIn&&bMatch)||(!bFilterIn&&!bMatch)) { 
     337        bool match = false; 
     338        if ((!bFilterNew)&&((bFilterIn&&bMatch)||(!bFilterIn&&!bMatch))) { 
     339          match = true; 
     340        } else if (bFilterNew&&bMatch) { 
     341          match = true; 
     342        } 
     343 
     344        if (match) { 
    287345          if (!syntax.empty()) { 
    288346            strEx::append_list(message, record.render(syntax)); 
    289           } else if (bShowDescriptions) { 
     347          } else if (!bShowDescriptions) { 
    290348            strEx::append_list(message, record.eventSource()); 
    291349          } else { 
     
    304362    CloseEventLog(hLog); 
    305363  } 
     364 
     365  if (!bPerfData) 
     366    query.perfData = false; 
    306367  query.runCheck(hit_count, returnCode, message, perf); 
    307368  if ((truncate > 0) && (message.length() > (truncate-4))) 
  • modules/CheckHelpers/CheckHelpers.vcproj

    r9ce8b01 r2603350  
    122122        Name="VCCLCompilerTool" 
    123123        AdditionalIncludeDirectories="../include;../../include" 
    124         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    125         RuntimeLibrary="2" 
     124        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     125        RuntimeLibrary="0" 
    126126        UsePrecompiledHeader="2" 
    127127        WarningLevel="3" 
     
    143143        LinkIncremental="1" 
    144144        ModuleDefinitionFile="CheckHelpers.def" 
    145         GenerateDebugInformation="true" 
     145        GenerateDebugInformation="false" 
    146146        SubSystem="2" 
    147147        OptimizeReferences="2" 
     
    254254      /> 
    255255    </Configuration> 
     256    <Configuration 
     257      Name="Nightly|Win32" 
     258      OutputDirectory="$(ConfigurationName)" 
     259      IntermediateDirectory="$(ConfigurationName)" 
     260      ConfigurationType="2" 
     261      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     262      CharacterSet="2" 
     263      > 
     264      <Tool 
     265        Name="VCPreBuildEventTool" 
     266      /> 
     267      <Tool 
     268        Name="VCCustomBuildTool" 
     269      /> 
     270      <Tool 
     271        Name="VCXMLDataGeneratorTool" 
     272      /> 
     273      <Tool 
     274        Name="VCWebServiceProxyGeneratorTool" 
     275      /> 
     276      <Tool 
     277        Name="VCMIDLTool" 
     278      /> 
     279      <Tool 
     280        Name="VCCLCompilerTool" 
     281        AdditionalIncludeDirectories="../include;../../include" 
     282        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     283        RuntimeLibrary="0" 
     284        UsePrecompiledHeader="2" 
     285        WarningLevel="3" 
     286        Detect64BitPortabilityProblems="true" 
     287        DebugInformationFormat="3" 
     288      /> 
     289      <Tool 
     290        Name="VCManagedResourceCompilerTool" 
     291      /> 
     292      <Tool 
     293        Name="VCResourceCompilerTool" 
     294      /> 
     295      <Tool 
     296        Name="VCPreLinkEventTool" 
     297      /> 
     298      <Tool 
     299        Name="VCLinkerTool" 
     300        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     301        LinkIncremental="1" 
     302        ModuleDefinitionFile="CheckHelpers.def" 
     303        GenerateDebugInformation="true" 
     304        SubSystem="2" 
     305        OptimizeReferences="2" 
     306        EnableCOMDATFolding="2" 
     307        ImportLibrary="$(OutDir)/CheckDisk.lib" 
     308        TargetMachine="1" 
     309      /> 
     310      <Tool 
     311        Name="VCALinkTool" 
     312      /> 
     313      <Tool 
     314        Name="VCManifestTool" 
     315      /> 
     316      <Tool 
     317        Name="VCXDCMakeTool" 
     318      /> 
     319      <Tool 
     320        Name="VCBscMakeTool" 
     321      /> 
     322      <Tool 
     323        Name="VCFxCopTool" 
     324      /> 
     325      <Tool 
     326        Name="VCAppVerifierTool" 
     327      /> 
     328      <Tool 
     329        Name="VCWebDeploymentTool" 
     330      /> 
     331      <Tool 
     332        Name="VCPostBuildEventTool" 
     333      /> 
     334    </Configuration> 
    256335  </Configurations> 
    257336  <References> 
     
    306385          /> 
    307386        </FileConfiguration> 
     387        <FileConfiguration 
     388          Name="Nightly|Win32" 
     389          > 
     390          <Tool 
     391            Name="VCCLCompilerTool" 
     392            UsePrecompiledHeader="1" 
     393          /> 
     394        </FileConfiguration> 
    308395      </File> 
    309396      <File 
     
    328415        <FileConfiguration 
    329416          Name="Distribution|Win32" 
     417          > 
     418          <Tool 
     419            Name="VCCLCompilerTool" 
     420            UsePrecompiledHeader="0" 
     421          /> 
     422        </FileConfiguration> 
     423        <FileConfiguration 
     424          Name="Nightly|Win32" 
    330425          > 
    331426          <Tool 
  • modules/CheckSystem/CheckSystem.cpp

    rd48c31a r2603350  
    1010#include <checkHelpers.hpp> 
    1111#include <map> 
     12#include <set> 
    1213#include <sysinfo.h> 
    1314 
     
    309310  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    310311  bool bNSClient = false; 
     312  bool bPerfData = true; 
    311313  CPULoadConatiner tmpObject; 
    312314 
     
    317319    MAP_OPTIONS_STR("warn", tmpObject.warn.max) 
    318320    MAP_OPTIONS_STR("crit", tmpObject.crit.max) 
     321    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    319322    MAP_OPTIONS_STR_AND("time", tmpObject.data, list.push_back(tmpObject)) 
    320323    MAP_OPTIONS_STR_AND("Time", tmpObject.data, list.push_back(tmpObject)) 
     
    349352    } else { 
    350353      load.setDefault(tmpObject); 
     354      if (!bPerfData) 
     355        load.perfData = false; 
    351356      load.runCheck(value, returnCode, msg, perf); 
    352357    } 
     
    371376  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    372377  bool bNSClient = false; 
     378  bool bPerfData = true; 
    373379  UpTimeConatiner bounds; 
    374380 
     
    379385    MAP_OPTIONS_STR("warn", bounds.warn.min) 
    380386    MAP_OPTIONS_STR("crit", bounds.crit.min) 
     387    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    381388    MAP_OPTIONS_STR("Alias", bounds.data) 
    382389    MAP_OPTIONS_SHOWALL(bounds) 
     
    396403  } else { 
    397404    value *= 1000; 
     405    if (!bPerfData) 
     406      bounds.perfData = false; 
    398407    bounds.runCheck(value, returnCode, msg, perf); 
    399408  } 
     
    441450  } 
    442451  std::list<StateConatiner> list; 
     452  std::set<std::string> excludeList; 
    443453  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    444454  bool bNSClient = false; 
    445455  StateConatiner tmpObject; 
    446  
    447   tmpObject.data = "uptime"; 
    448   tmpObject.warn.state = "started"; 
    449  
     456  bool bPerfData = true; 
     457  bool bAutoStart = false; 
     458 
     459  tmpObject.data = "service"; 
     460  tmpObject.crit.state = "started"; 
     461  //{{ 
    450462  MAP_OPTIONS_BEGIN(stl_args) 
    451463    MAP_OPTIONS_SHOWALL(tmpObject) 
    452464    MAP_OPTIONS_STR("Alias", tmpObject.data) 
     465    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    453466    MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 
     467    MAP_OPTIONS_BOOL_TRUE("CheckAll", bAutoStart) 
     468    MAP_OPTIONS_INSERT("exclude", excludeList) 
    454469    MAP_OPTIONS_SECONDARY_BEGIN(":", p2) 
    455       else if (p2.first == "Time") { 
    456         tmpObject.data = p__.second; 
    457         tmpObject.alias = p2.second; 
    458         list.push_back(tmpObject); 
    459       } 
    460470      MAP_OPTIONS_MISSING_EX(p2, msg, "Unknown argument: ") 
    461471    MAP_OPTIONS_SECONDARY_END() 
     
    469479    } 
    470480  MAP_OPTIONS_END() 
    471  
     481  //}} 
     482  if (bAutoStart) { 
     483    // get a list of all service with startup type Automatic  
     484    std::list<TNtServiceInfo> service_list_automatic; 
     485    TNtServiceInfo::EnumServices(SERVICE_WIN32,SERVICE_INACTIVE|SERVICE_ACTIVE,&service_list_automatic);  
     486    for (std::list<TNtServiceInfo>::const_iterator service =service_list_automatic.begin();service!=service_list_automatic.end();++service) {  
     487      if (excludeList.find((*service).m_strServiceName) == excludeList.end()) { 
     488        if((*service).m_dwStartType == 2 ) { 
     489          tmpObject.data = (*service).m_strServiceName; 
     490          tmpObject.crit.state = "started";  
     491          list.push_back(tmpObject);  
     492          //stl_forward.push_back((*service).m_strServiceName);  
     493        } 
     494        else if((*service).m_dwStartType == 4 ) { 
     495          tmpObject.data = (*service).m_strServiceName; 
     496          tmpObject.crit.state = "stopped";  
     497          list.push_back(tmpObject);  
     498        } 
     499      } 
     500    }  
     501  } 
    472502  for (std::list<StateConatiner>::iterator it = list.begin(); it != list.end(); ++it) { 
    473503    TNtServiceInfo info; 
     
    509539      else 
    510540        value = checkHolders::state_none; 
     541      if (!bPerfData) 
     542        (*it).perfData = false; 
    511543      (*it).runCheck(value, returnCode, msg, perf); 
    512544    } 
     
    542574  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    543575  bool bShowAll = false; 
     576  bool bPerfData = true; 
    544577  bool bNSClient = false; 
    545578  MemoryConatiner bounds; 
     
    551584    MAP_OPTIONS_STR("Alias", bounds.data) 
    552585    MAP_OPTIONS_SHOWALL(bounds) 
     586    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    553587    MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 
    554588    MAP_OPTIONS_MODE("type", "paged", type, tPaged) 
     
    603637    return NSCAPI::returnOK; 
    604638  } else { 
     639    if (!bPerfData) 
     640      bounds.perfData = false; 
    605641    bounds.runCheck(value, returnCode, msg, perf); 
    606642  } 
     
    668704  bool bNSClient = false; 
    669705  StateConatiner tmpObject; 
     706  bool bPerfData = true; 
    670707 
    671708  tmpObject.data = "uptime"; 
     
    676713    MAP_OPTIONS_STR("Alias", tmpObject.alias) 
    677714    MAP_OPTIONS_SHOWALL(tmpObject) 
     715    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    678716    MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 
    679717    MAP_OPTIONS_SECONDARY_BEGIN(":", p2) 
     
    713751      if (bFound && (*it).showAll()) { 
    714752        if (!msg.empty()) msg += " - "; 
    715         msg += (*it).data + ": Started"; 
     753        msg += (*it).data + ": Running"; 
    716754      } else if (bFound) { 
    717755      } else { 
    718756        if (!msg.empty()) msg += " - "; 
    719         msg += (*it).data + ": Stopped"; 
     757        msg += (*it).data + ": not running"; 
    720758        NSCHelper::escalteReturnCodeToCRIT(returnCode); 
    721759      } 
     
    729767        value.state = checkHolders::state_stopped; 
    730768      } 
     769      if (!bPerfData) 
     770        (*it).perfData = false; 
    731771      (*it).runCheck(value, returnCode, msg, perf); 
    732772    } 
     
    765805  NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 
    766806  bool bNSClient = false; 
     807  bool bPerfData = true; 
    767808  /* average maax */ 
    768809  bool bCheckAverages = true;  
     
    776817    MAP_OPTIONS_STR("MaxCrit", tmpObject.crit.max) 
    777818    MAP_OPTIONS_STR("MinCrit", tmpObject.crit.min) 
     819    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    778820    MAP_OPTIONS_STR("Alias", tmpObject.data) 
    779821    MAP_OPTIONS_SHOWALL(tmpObject) 
     
    815857        msg += strEx::itos(value); 
    816858      } else { 
     859        if (!bPerfData) 
     860          counter.perfData = false; 
    817861        counter.setDefault(tmpObject); 
    818862        counter.runCheck(value, returnCode, msg, perf); 
  • modules/CheckSystem/PDHCollector.cpp

    rd48c31a r2603350  
    4545* @author mickem 
    4646* 
    47 * @date 03-13-2004 
     47* @date 03-13-2004                
    4848* 
    4949* @bug If we have "custom named" counters ? 
  • modules/CheckWMI/CheckWMI.vcproj

    r9ce8b01 r2603350  
    124124        Name="VCCLCompilerTool" 
    125125        AdditionalIncludeDirectories="../include;../../include" 
    126         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    127         RuntimeLibrary="2" 
     126        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     127        RuntimeLibrary="0" 
    128128        UsePrecompiledHeader="2" 
    129129        WarningLevel="3" 
     
    147147        AdditionalLibraryDirectories="" 
    148148        ModuleDefinitionFile="CheckWMI.def" 
    149         GenerateDebugInformation="true" 
     149        GenerateDebugInformation="false" 
    150150        SubSystem="2" 
    151151        OptimizeReferences="2" 
     
    260260      /> 
    261261    </Configuration> 
     262    <Configuration 
     263      Name="Nightly|Win32" 
     264      OutputDirectory="$(ConfigurationName)" 
     265      IntermediateDirectory="$(ConfigurationName)" 
     266      ConfigurationType="2" 
     267      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     268      CharacterSet="2" 
     269      > 
     270      <Tool 
     271        Name="VCPreBuildEventTool" 
     272      /> 
     273      <Tool 
     274        Name="VCCustomBuildTool" 
     275      /> 
     276      <Tool 
     277        Name="VCXMLDataGeneratorTool" 
     278      /> 
     279      <Tool 
     280        Name="VCWebServiceProxyGeneratorTool" 
     281      /> 
     282      <Tool 
     283        Name="VCMIDLTool" 
     284      /> 
     285      <Tool 
     286        Name="VCCLCompilerTool" 
     287        AdditionalIncludeDirectories="../include;../../include" 
     288        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     289        RuntimeLibrary="0" 
     290        UsePrecompiledHeader="2" 
     291        WarningLevel="3" 
     292        Detect64BitPortabilityProblems="true" 
     293        DebugInformationFormat="3" 
     294      /> 
     295      <Tool 
     296        Name="VCManagedResourceCompilerTool" 
     297      /> 
     298      <Tool 
     299        Name="VCResourceCompilerTool" 
     300      /> 
     301      <Tool 
     302        Name="VCPreLinkEventTool" 
     303      /> 
     304      <Tool 
     305        Name="VCLinkerTool" 
     306        AdditionalDependencies="Wbemuuid.lib" 
     307        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     308        LinkIncremental="1" 
     309        AdditionalLibraryDirectories="" 
     310        ModuleDefinitionFile="CheckWMI.def" 
     311        GenerateDebugInformation="true" 
     312        SubSystem="2" 
     313        OptimizeReferences="2" 
     314        EnableCOMDATFolding="2" 
     315        ImportLibrary="$(OutDir)/CheckWMI.lib" 
     316        TargetMachine="1" 
     317      /> 
     318      <Tool 
     319        Name="VCALinkTool" 
     320      /> 
     321      <Tool 
     322        Name="VCManifestTool" 
     323      /> 
     324      <Tool 
     325        Name="VCXDCMakeTool" 
     326      /> 
     327      <Tool 
     328        Name="VCBscMakeTool" 
     329      /> 
     330      <Tool 
     331        Name="VCFxCopTool" 
     332      /> 
     333      <Tool 
     334        Name="VCAppVerifierTool" 
     335      /> 
     336      <Tool 
     337        Name="VCWebDeploymentTool" 
     338      /> 
     339      <Tool 
     340        Name="VCPostBuildEventTool" 
     341      /> 
     342    </Configuration> 
    262343  </Configurations> 
    263344  <References> 
     
    308389          /> 
    309390        </FileConfiguration> 
     391        <FileConfiguration 
     392          Name="Nightly|Win32" 
     393          > 
     394          <Tool 
     395            Name="VCCLCompilerTool" 
     396            UsePrecompiledHeader="1" 
     397          /> 
     398        </FileConfiguration> 
    310399      </File> 
    311400      <File 
     
    330419        <FileConfiguration 
    331420          Name="Distribution|Win32" 
     421          > 
     422          <Tool 
     423            Name="VCCLCompilerTool" 
     424            UsePrecompiledHeader="0" 
     425          /> 
     426        </FileConfiguration> 
     427        <FileConfiguration 
     428          Name="Nightly|Win32" 
    332429          > 
    333430          <Tool 
  • modules/FileLogger/FileLogger.vcproj

    r9ce8b01 r2603350  
    4141        Name="VCCLCompilerTool" 
    4242        AdditionalIncludeDirectories="../include;../../include" 
    43         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    44         RuntimeLibrary="2" 
     43        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     44        RuntimeLibrary="0" 
    4545        UsePrecompiledHeader="2" 
    4646        WarningLevel="3" 
     
    6262        LinkIncremental="1" 
    6363        ModuleDefinitionFile="FileLogger.def" 
    64         GenerateDebugInformation="true" 
     64        GenerateDebugInformation="false" 
    6565        SubSystem="2" 
    6666        OptimizeReferences="2" 
     
    203203        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    204204        RuntimeLibrary="2" 
     205        UsePrecompiledHeader="2" 
     206        WarningLevel="3" 
     207        Detect64BitPortabilityProblems="true" 
     208        DebugInformationFormat="3" 
     209      /> 
     210      <Tool 
     211        Name="VCManagedResourceCompilerTool" 
     212      /> 
     213      <Tool 
     214        Name="VCResourceCompilerTool" 
     215      /> 
     216      <Tool 
     217        Name="VCPreLinkEventTool" 
     218      /> 
     219      <Tool 
     220        Name="VCLinkerTool" 
     221        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     222        LinkIncremental="1" 
     223        ModuleDefinitionFile="FileLogger.def" 
     224        GenerateDebugInformation="true" 
     225        SubSystem="2" 
     226        OptimizeReferences="2" 
     227        EnableCOMDATFolding="2" 
     228        ImportLibrary="$(OutDir)/FileLogger.lib" 
     229        TargetMachine="1" 
     230      /> 
     231      <Tool 
     232        Name="VCALinkTool" 
     233      /> 
     234      <Tool 
     235        Name="VCManifestTool" 
     236      /> 
     237      <Tool 
     238        Name="VCXDCMakeTool" 
     239      /> 
     240      <Tool 
     241        Name="VCBscMakeTool" 
     242      /> 
     243      <Tool 
     244        Name="VCFxCopTool" 
     245      /> 
     246      <Tool 
     247        Name="VCAppVerifierTool" 
     248      /> 
     249      <Tool 
     250        Name="VCWebDeploymentTool" 
     251      /> 
     252      <Tool 
     253        Name="VCPostBuildEventTool" 
     254      /> 
     255    </Configuration> 
     256    <Configuration 
     257      Name="Nightly|Win32" 
     258      OutputDirectory="$(ConfigurationName)" 
     259      IntermediateDirectory="$(ConfigurationName)" 
     260      ConfigurationType="2" 
     261      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     262      CharacterSet="2" 
     263      > 
     264      <Tool 
     265        Name="VCPreBuildEventTool" 
     266      /> 
     267      <Tool 
     268        Name="VCCustomBuildTool" 
     269      /> 
     270      <Tool 
     271        Name="VCXMLDataGeneratorTool" 
     272      /> 
     273      <Tool 
     274        Name="VCWebServiceProxyGeneratorTool" 
     275      /> 
     276      <Tool 
     277        Name="VCMIDLTool" 
     278      /> 
     279      <Tool 
     280        Name="VCCLCompilerTool" 
     281        AdditionalIncludeDirectories="../include;../../include" 
     282        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     283        RuntimeLibrary="0" 
    205284        UsePrecompiledHeader="2" 
    206285        WarningLevel="3" 
     
    302381          /> 
    303382        </FileConfiguration> 
     383        <FileConfiguration 
     384          Name="Nightly|Win32" 
     385          > 
     386          <Tool 
     387            Name="VCCLCompilerTool" 
     388            UsePrecompiledHeader="1" 
     389          /> 
     390        </FileConfiguration> 
    304391      </File> 
    305392    </Filter> 
  • modules/NRPEListener/NRPEListener.cpp

    r0687108 r2603350  
    1717} 
    1818 
    19 NRPEListener::NRPEListener() { 
     19NRPEListener::NRPEListener() : noPerfData_(false) { 
    2020} 
    2121NRPEListener::~NRPEListener() { 
     
    3737bool NRPEListener::loadModule() { 
    3838  bUseSSL_ = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_USE_SSL ,NRPE_SETTINGS_USE_SSL_DEFAULT)==1; 
     39  noPerfData_ = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_PERFDATA,NRPE_SETTINGS_PERFDATA_DEFAULT)==1; 
    3940  timeout = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_TIMEOUT ,NRPE_SETTINGS_TIMEOUT_DEFAULT); 
    4041  std::list<std::string> commands = NSCModuleHelper::getSettingsSection(NRPE_HANDLER_SECTION_TITLE); 
     
    131132  } 
    132133 
    133   if ((str.substr(0,6) == "inject")&&(str.length() > 7)) { 
     134  if ((str.length() > 7)&&(str.substr(0,6) == "inject")) { 
    134135    strEx::token t = strEx::getToken(str.substr(7), ' '); 
    135136    std::string s = t.second; 
     
    153154        else 
    154155          pEnd = s.length()-1; 
    155  
     156        if (p != std::string::npos) { 
     157          p++; 
     158        } 
    156159      } else { 
    157160        pEnd = p = s.find(' ', ++p); 
     161        if (p != std::string::npos) { 
     162          p = s.find_first_not_of(' ', p); 
     163        } 
    158164      } 
    159165      if (!sTarget.empty()) 
     
    167173      } 
    168174      sTarget += s.substr(pStart,pEnd-pStart); 
    169       p++; 
     175      //p++; 
    170176    } 
    171177    return NSCModuleHelper::InjectSplitAndCommand(t.first, sTarget, '!', message, perf); 
     
    332338  if (NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_ALLOW_ARGUMENTS, NRPE_SETTINGS_ALLOW_ARGUMENTS_DEFAULT) == 0) { 
    333339    if (!cmd.second.empty()) { 
    334       NSC_LOG_ERROR("Request contained arguments (not currently allowed)."); 
    335       throw NRPEException("Request contained arguments (not currently allowed)."); 
     340      NSC_LOG_ERROR("Request contained arguments (not currently allowed, check the allow_arguments option)."); 
     341      throw NRPEException("Request contained arguments (not currently allowed, check the allow_arguments option)."); 
    336342    } 
    337343  } 
     
    348354 
    349355  NSCAPI::nagiosReturn ret = NSCModuleHelper::InjectSplitAndCommand(cmd.first, cmd.second, '!', msg, perf); 
    350   if (perf.empty()) { 
     356  switch (ret) { 
     357    case NSCAPI::returnInvalidBufferLen: 
     358      msg = "UNKNOWN: Return buffer to small to handle this command."; 
     359      ret = NSCAPI::returnUNKNOWN; 
     360      break; 
     361    case NSCAPI::returnIgnored: 
     362      msg = "UNKNOWN: No handler for that command"; 
     363      ret = NSCAPI::returnUNKNOWN; 
     364      break; 
     365    case NSCAPI::returnOK: 
     366    case NSCAPI::returnWARN: 
     367    case NSCAPI::returnCRIT: 
     368    case NSCAPI::returnUNKNOWN: 
     369      break; 
     370    default: 
     371      msg = "UNKNOWN: Internal error."; 
     372      ret = NSCAPI::returnUNKNOWN; 
     373  } 
     374  if (perf.empty()||noPerfData_) { 
    351375    return NRPEPacket(NRPEPacket::responsePacket, NRPEPacket::version2, ret, msg); 
    352376  } else { 
  • modules/NRPEListener/NRPEListener.h

    re26cfe0 r2603350  
    1414  unsigned int timeout; 
    1515  socketHelpers::allowedHosts allowedHosts; 
     16  bool noPerfData_; 
    1617 
    1718public: 
  • modules/NRPEListener/NRPEListener.vcproj

    r9ce8b01 r2603350  
    4545        MinimalRebuild="true" 
    4646        BasicRuntimeChecks="3" 
    47         RuntimeLibrary="3" 
     47        RuntimeLibrary="1" 
    4848        UsePrecompiledHeader="2" 
    4949        WarningLevel="3" 
     
    6565        OutputFile="../../Debug/modules/$(ProjectName).dll" 
    6666        LinkIncremental="2" 
    67         AdditionalLibraryDirectories="&quot;C:\Source\openssl-0.9.7f\out32dll.dbg&quot;" 
     67        AdditionalLibraryDirectories="" 
    6868        ModuleDefinitionFile="NRPEListener.def" 
    6969        GenerateDebugInformation="true" 
     
    124124        Name="VCCLCompilerTool" 
    125125        AdditionalIncludeDirectories="../include;../../include" 
    126         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    127         RuntimeLibrary="2" 
     126        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     127        RuntimeLibrary="0" 
    128128        UsePrecompiledHeader="2" 
    129129        WarningLevel="3" 
     
    147147        AdditionalLibraryDirectories="&quot;C:\Source\openssl-0.9.7f\out32dll&quot;" 
    148148        ModuleDefinitionFile="NRPEListener.def" 
    149         GenerateDebugInformation="true" 
     149        GenerateDebugInformation="false" 
    150150        SubSystem="2" 
    151151        OptimizeReferences="2" 
     
    259259      /> 
    260260    </Configuration> 
     261    <Configuration 
     262      Name="Nightly|Win32" 
     263      OutputDirectory="$(ConfigurationName)" 
     264      IntermediateDirectory="$(ConfigurationName)" 
     265      ConfigurationType="2" 
     266      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     267      CharacterSet="2" 
     268      > 
     269      <Tool 
     270        Name="VCPreBuildEventTool" 
     271      /> 
     272      <Tool 
     273        Name="VCCustomBuildTool" 
     274      /> 
     275      <Tool 
     276        Name="VCXMLDataGeneratorTool" 
     277      /> 
     278      <Tool 
     279        Name="VCWebServiceProxyGeneratorTool" 
     280      /> 
     281      <Tool 
     282        Name="VCMIDLTool" 
     283      /> 
     284      <Tool 
     285        Name="VCCLCompilerTool" 
     286        AdditionalIncludeDirectories="../include;../../include" 
     287        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     288        RuntimeLibrary="0" 
     289        UsePrecompiledHeader="2" 
     290        WarningLevel="3" 
     291        Detect64BitPortabilityProblems="true" 
     292        DebugInformationFormat="3" 
     293      /> 
     294      <Tool 
     295        Name="VCManagedResourceCompilerTool" 
     296      /> 
     297      <Tool 
     298        Name="VCResourceCompilerTool" 
     299      /> 
     300      <Tool 
     301        Name="VCPreLinkEventTool" 
     302      /> 
     303      <Tool 
     304        Name="VCLinkerTool" 
     305        AdditionalDependencies="ws2_32.lib ssleay32.lib libeay32.lib" 
     306        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     307        LinkIncremental="1" 
     308        ModuleDefinitionFile="NRPEListener.def" 
     309        GenerateDebugInformation="true" 
     310        SubSystem="2" 
     311        OptimizeReferences="2" 
     312        EnableCOMDATFolding="2" 
     313        ImportLibrary="$(OutDir)/NRPEListener.lib" 
     314        TargetMachine="1" 
     315      /> 
     316      <Tool 
     317        Name="VCALinkTool" 
     318      /> 
     319      <Tool 
     320        Name="VCManifestTool" 
     321      /> 
     322      <Tool 
     323        Name="VCXDCMakeTool" 
     324      /> 
     325      <Tool 
     326        Name="VCBscMakeTool" 
     327      /> 
     328      <Tool 
     329        Name="VCFxCopTool" 
     330      /> 
     331      <Tool 
     332        Name="VCAppVerifierTool" 
     333      /> 
     334      <Tool 
     335        Name="VCWebDeploymentTool" 
     336      /> 
     337      <Tool 
     338        Name="VCPostBuildEventTool" 
     339      /> 
     340    </Configuration> 
    261341  </Configurations> 
    262342  <References> 
     
    323403          /> 
    324404        </FileConfiguration> 
     405        <FileConfiguration 
     406          Name="Nightly|Win32" 
     407          > 
     408          <Tool 
     409            Name="VCCLCompilerTool" 
     410            UsePrecompiledHeader="1" 
     411          /> 
     412        </FileConfiguration> 
    325413      </File> 
    326414      <File 
     
    345433        <FileConfiguration 
    346434          Name="Distribution|Win32" 
     435          > 
     436          <Tool 
     437            Name="VCCLCompilerTool" 
     438            UsePrecompiledHeader="0" 
     439          /> 
     440        </FileConfiguration> 
     441        <FileConfiguration 
     442          Name="Nightly|Win32" 
    347443          > 
    348444          <Tool 
  • modules/NSClientListener/NSClientListener.cpp

    rd48c31a r2603350  
    110110  return password; 
    111111} 
     112bool NSClientListener::isPasswordOk(std::string remotePassword)  { 
     113  std::string localPassword = getPassword(); 
     114  if (localPassword == remotePassword) { 
     115    return true; 
     116  } 
     117  if ((remotePassword == "None") && (localPassword.empty())) { 
     118    return true; 
     119  } 
     120  return false; 
     121} 
    112122 
    113123std::string NSClientListener::parseRequest(std::string buffer)  { 
    114124  strEx::token pwd = strEx::getToken(buffer, '&'); 
    115   std::string rPwd = getPassword(); 
    116   if ((pwd.first != rPwd) || ((pwd.first == "None") && (!rPwd.empty())) ) { 
    117     NSC_LOG_ERROR_STD("Invalid password (" + pwd.first + ")."); 
     125  if (!isPasswordOk(pwd.first)) { 
     126    NSC_LOG_ERROR_STD("Invalid password (" + pwd.first +")."); 
    118127    return "ERROR: Invalid password.";  
    119   } if (pwd.second.empty()) 
     128  } 
     129  if (pwd.second.empty()) 
    120130    return "ERRRO: No command specified."; 
    121131  strEx::token cmd = strEx::getToken(pwd.second, '&'); 
  • modules/NSClientListener/NSClientListener.h

    re26cfe0 r2603350  
    3030 
    3131  std::string parseRequest(std::string buffer); 
     32  bool isPasswordOk(std::string remotePassword); 
    3233 
    3334  // simpleSocket::ListenerHandler implementation 
  • modules/NSClientListener/NSClientListener.vcproj

    r9ce8b01 r2603350  
    123123        Name="VCCLCompilerTool" 
    124124        AdditionalIncludeDirectories="../include;../../include" 
    125         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NSCLIENTLISTENER_EXPORTS" 
     125        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     126        RuntimeLibrary="0" 
     127        UsePrecompiledHeader="2" 
     128        WarningLevel="3" 
     129        Detect64BitPortabilityProblems="true" 
     130        DebugInformationFormat="3" 
     131      /> 
     132      <Tool 
     133        Name="VCManagedResourceCompilerTool" 
     134      /> 
     135      <Tool 
     136        Name="VCResourceCompilerTool" 
     137      /> 
     138      <Tool 
     139        Name="VCPreLinkEventTool" 
     140      /> 
     141      <Tool 
     142        Name="VCLinkerTool" 
     143        AdditionalDependencies="ws2_32.lib" 
     144        OutputFile="../../Release/modules/$(ProjectName).dll" 
     145        LinkIncremental="1" 
     146        ModuleDefinitionFile="NSClientListener.def" 
     147        GenerateDebugInformation="false" 
     148        SubSystem="2" 
     149        OptimizeReferences="2" 
     150        EnableCOMDATFolding="2" 
     151        ImportLibrary="$(OutDir)/NSClientListener.lib" 
     152        TargetMachine="1" 
     153      /> 
     154      <Tool 
     155        Name="VCALinkTool" 
     156      /> 
     157      <Tool 
     158        Name="VCManifestTool" 
     159      /> 
     160      <Tool 
     161        Name="VCXDCMakeTool" 
     162      /> 
     163      <Tool 
     164        Name="VCBscMakeTool" 
     165      /> 
     166      <Tool 
     167        Name="VCFxCopTool" 
     168      /> 
     169      <Tool 
     170        Name="VCAppVerifierTool" 
     171      /> 
     172      <Tool 
     173        Name="VCWebDeploymentTool" 
     174      /> 
     175      <Tool 
     176        Name="VCPostBuildEventTool" 
     177      /> 
     178    </Configuration> 
     179    <Configuration 
     180      Name="Distribution|Win32" 
     181      OutputDirectory="$(ConfigurationName)" 
     182      IntermediateDirectory="$(ConfigurationName)" 
     183      ConfigurationType="2" 
     184      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     185      CharacterSet="2" 
     186      > 
     187      <Tool 
     188        Name="VCPreBuildEventTool" 
     189      /> 
     190      <Tool 
     191        Name="VCCustomBuildTool" 
     192      /> 
     193      <Tool 
     194        Name="VCXMLDataGeneratorTool" 
     195      /> 
     196      <Tool 
     197        Name="VCWebServiceProxyGeneratorTool" 
     198      /> 
     199      <Tool 
     200        Name="VCMIDLTool" 
     201      /> 
     202      <Tool 
     203        Name="VCCLCompilerTool" 
     204        AdditionalIncludeDirectories="../include;../../include" 
     205        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    126206        RuntimeLibrary="2" 
    127207        UsePrecompiledHeader="2" 
     
    142222        Name="VCLinkerTool" 
    143223        AdditionalDependencies="ws2_32.lib" 
    144         OutputFile="../../Release/modules/$(ProjectName).dll" 
     224        OutputFile="../../Dist/modules/$(ProjectName).dll" 
    145225        LinkIncremental="1" 
    146226        ModuleDefinitionFile="NSClientListener.def" 
     
    178258    </Configuration> 
    179259    <Configuration 
    180       Name="Distribution|Win32" 
     260      Name="Nightly|Win32" 
    181261      OutputDirectory="$(ConfigurationName)" 
    182262      IntermediateDirectory="$(ConfigurationName)" 
     
    204284        AdditionalIncludeDirectories="../include;../../include" 
    205285        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    206         RuntimeLibrary="2" 
     286        RuntimeLibrary="0" 
    207287        UsePrecompiledHeader="2" 
    208288        WarningLevel="3" 
     
    313393          /> 
    314394        </FileConfiguration> 
     395        <FileConfiguration 
     396          Name="Nightly|Win32" 
     397          > 
     398          <Tool 
     399            Name="VCCLCompilerTool" 
     400            UsePrecompiledHeader="1" 
     401          /> 
     402        </FileConfiguration> 
    315403      </File> 
    316404    </Filter> 
  • modules/RemoteConfiguration/RemoteConfiguration.vcproj

    r1a22e52 r2603350  
    100100    </Configuration> 
    101101    <Configuration 
    102       Name="Release|Win32" 
    103       OutputDirectory="Release" 
    104       IntermediateDirectory="Release" 
    105       ConfigurationType="2" 
    106       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    107       CharacterSet="2" 
    108       > 
    109       <Tool 
    110         Name="VCPreBuildEventTool" 
    111       /> 
    112       <Tool 
    113         Name="VCCustomBuildTool" 
    114       /> 
    115       <Tool 
    116         Name="VCXMLDataGeneratorTool" 
    117       /> 
    118       <Tool 
    119         Name="VCWebServiceProxyGeneratorTool" 
    120       /> 
    121       <Tool 
    122         Name="VCMIDLTool" 
    123       /> 
    124       <Tool 
    125         Name="VCCLCompilerTool" 
    126         AdditionalIncludeDirectories="../include;../../include" 
    127         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    128         RuntimeLibrary="2" 
    129         UsePrecompiledHeader="2" 
    130         WarningLevel="3" 
    131         Detect64BitPortabilityProblems="true" 
    132         DebugInformationFormat="3" 
    133       /> 
    134       <Tool 
    135         Name="VCManagedResourceCompilerTool" 
    136       /> 
    137       <Tool 
    138         Name="VCResourceCompilerTool" 
    139       /> 
    140       <Tool 
    141         Name="VCPreLinkEventTool" 
    142       /> 
    143       <Tool 
    144         Name="VCLinkerTool" 
    145         OutputFile="../../Release/modules/$(ProjectName).dll" 
    146         LinkIncremental="1" 
    147         ModuleDefinitionFile="RemoteConfiguration.def" 
    148         GenerateDebugInformation="true" 
    149         SubSystem="2" 
    150         OptimizeReferences="2" 
    151         EnableCOMDATFolding="2" 
    152         ImportLibrary="$(OutDir)/RemoteConfiguration.lib" 
    153         TargetMachine="1" 
    154       /> 
    155       <Tool 
    156         Name="VCALinkTool" 
    157       /> 
    158       <Tool 
    159         Name="VCManifestTool" 
    160       /> 
    161       <Tool 
    162         Name="VCXDCMakeTool" 
    163       /> 
    164       <Tool 
    165         Name="VCBscMakeTool" 
    166       /> 
    167       <Tool 
    168         Name="VCFxCopTool" 
    169       /> 
    170       <Tool 
    171         Name="VCAppVerifierTool" 
    172       /> 
    173       <Tool 
    174         Name="VCWebDeploymentTool" 
    175       /> 
    176       <Tool 
    177         Name="VCPostBuildEventTool" 
    178       /> 
    179     </Configuration> 
    180     <Configuration 
    181       Name="Distribution|Win32" 
    182       OutputDirectory="$(ConfigurationName)" 
    183       IntermediateDirectory="$(ConfigurationName)" 
    184       ConfigurationType="2" 
    185       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    186       CharacterSet="2" 
    187       > 
    188       <Tool 
    189         Name="VCPreBuildEventTool" 
    190       /> 
    191       <Tool 
    192         Name="VCCustomBuildTool" 
    193       /> 
    194       <Tool 
    195         Name="VCXMLDataGeneratorTool" 
    196       /> 
    197       <Tool 
    198         Name="VCWebServiceProxyGeneratorTool" 
    199       /> 
    200       <Tool 
    201         Name="VCMIDLTool" 
    202       /> 
    203       <Tool 
    204         Name="VCCLCompilerTool" 
    205         AdditionalIncludeDirectories="../include;../../include" 
    206         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    207         RuntimeLibrary="2" 
    208         UsePrecompiledHeader="2" 
    209         WarningLevel="3" 
    210         Detect64BitPortabilityProblems="true" 
    211         DebugInformationFormat="3" 
    212       /> 
    213       <Tool 
    214         Name="VCManagedResourceCompilerTool" 
    215       /> 
    216       <Tool 
    217         Name="VCResourceCompilerTool" 
    218       /> 
    219       <Tool 
    220         Name="VCPreLinkEventTool" 
    221       /> 
    222       <Tool 
    223         Name="VCLinkerTool" 
    224         OutputFile="../../Dist/modules/$(ProjectName).dll" 
    225         LinkIncremental="1" 
    226         ModuleDefinitionFile="RemoteConfiguration.def" 
    227         GenerateDebugInformation="true" 
    228         SubSystem="2" 
    229         OptimizeReferences="2" 
    230         EnableCOMDATFolding="2" 
    231         ImportLibrary="$(OutDir)/RemoteConfiguration.lib" 
    232         TargetMachine="1" 
    233       /> 
    234       <Tool 
    235         Name="VCALinkTool" 
    236       /> 
    237       <Tool 
    238         Name="VCManifestTool" 
    239       /> 
    240       <Tool 
    241         Name="VCXDCMakeTool" 
    242       /> 
    243       <Tool 
    244         Name="VCBscMakeTool" 
    245       /> 
    246       <Tool 
    247         Name="VCFxCopTool" 
    248       /> 
    249       <Tool 
    250         Name="VCAppVerifierTool" 
    251       /> 
    252       <Tool 
    253         Name="VCWebDeploymentTool" 
    254       /> 
    255       <Tool 
    256         Name="VCPostBuildEventTool" 
    257       /> 
    258     </Configuration> 
    259     <Configuration 
    260102      Name="Debug|x64" 
    261103      OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     
    340182    </Configuration> 
    341183    <Configuration 
     184      Name="Release|Win32" 
     185      OutputDirectory="Release" 
     186      IntermediateDirectory="Release" 
     187      ConfigurationType="2" 
     188      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     189      CharacterSet="2" 
     190      > 
     191      <Tool 
     192        Name="VCPreBuildEventTool" 
     193      /> 
     194      <Tool 
     195        Name="VCCustomBuildTool" 
     196      /> 
     197      <Tool 
     198        Name="VCXMLDataGeneratorTool" 
     199      /> 
     200      <Tool 
     201        Name="VCWebServiceProxyGeneratorTool" 
     202      /> 
     203      <Tool 
     204        Name="VCMIDLTool" 
     205      /> 
     206      <Tool 
     207        Name="VCCLCompilerTool" 
     208        AdditionalIncludeDirectories="../include;../../include" 
     209        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     210        RuntimeLibrary="0" 
     211        UsePrecompiledHeader="2" 
     212        WarningLevel="3" 
     213        Detect64BitPortabilityProblems="true" 
     214        DebugInformationFormat="3" 
     215      /> 
     216      <Tool 
     217        Name="VCManagedResourceCompilerTool" 
     218      /> 
     219      <Tool 
     220        Name="VCResourceCompilerTool" 
     221      /> 
     222      <Tool 
     223        Name="VCPreLinkEventTool" 
     224      /> 
     225      <Tool 
     226        Name="VCLinkerTool" 
     227        OutputFile="../../Release/modules/$(ProjectName).dll" 
     228        LinkIncremental="1" 
     229        ModuleDefinitionFile="RemoteConfiguration.def" 
     230        GenerateDebugInformation="false" 
     231        SubSystem="2" 
     232        OptimizeReferences="2" 
     233        EnableCOMDATFolding="2" 
     234        ImportLibrary="$(OutDir)/RemoteConfiguration.lib" 
     235        TargetMachine="1" 
     236      /> 
     237      <Tool 
     238        Name="VCALinkTool" 
     239      /> 
     240      <Tool 
     241        Name="VCManifestTool" 
     242      /> 
     243      <Tool 
     244        Name="VCXDCMakeTool" 
     245      /> 
     246      <Tool 
     247        Name="VCBscMakeTool" 
     248      /> 
     249      <Tool 
     250        Name="VCFxCopTool" 
     251      /> 
     252      <Tool 
     253        Name="VCAppVerifierTool" 
     254      /> 
     255      <Tool 
     256        Name="VCWebDeploymentTool" 
     257      /> 
     258      <Tool 
     259        Name="VCPostBuildEventTool" 
     260      /> 
     261    </Configuration> 
     262    <Configuration 
    342263      Name="Release|x64" 
    343264      OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     
    420341    </Configuration> 
    421342    <Configuration 
     343      Name="Distribution|Win32" 
     344      OutputDirectory="$(ConfigurationName)" 
     345      IntermediateDirectory="$(ConfigurationName)" 
     346      ConfigurationType="2" 
     347      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     348      CharacterSet="2" 
     349      > 
     350      <Tool 
     351        Name="VCPreBuildEventTool" 
     352      /> 
     353      <Tool 
     354        Name="VCCustomBuildTool" 
     355      /> 
     356      <Tool 
     357        Name="VCXMLDataGeneratorTool" 
     358      /> 
     359      <Tool 
     360        Name="VCWebServiceProxyGeneratorTool" 
     361      /> 
     362      <Tool 
     363        Name="VCMIDLTool" 
     364      /> 
     365      <Tool 
     366        Name="VCCLCompilerTool" 
     367        AdditionalIncludeDirectories="../include;../../include" 
     368        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     369        RuntimeLibrary="2" 
     370        UsePrecompiledHeader="2" 
     371        WarningLevel="3" 
     372        Detect64BitPortabilityProblems="true" 
     373        DebugInformationFormat="3" 
     374      /> 
     375      <Tool 
     376        Name="VCManagedResourceCompilerTool" 
     377      /> 
     378      <Tool 
     379        Name="VCResourceCompilerTool" 
     380      /> 
     381      <Tool 
     382        Name="VCPreLinkEventTool" 
     383      /> 
     384      <Tool 
     385        Name="VCLinkerTool" 
     386        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     387        LinkIncremental="1" 
     388        ModuleDefinitionFile="RemoteConfiguration.def" 
     389        GenerateDebugInformation="true" 
     390        SubSystem="2" 
     391        OptimizeReferences="2" 
     392        EnableCOMDATFolding="2" 
     393        ImportLibrary="$(OutDir)/RemoteConfiguration.lib" 
     394        TargetMachine="1" 
     395      /> 
     396      <Tool 
     397        Name="VCALinkTool" 
     398      /> 
     399      <Tool 
     400        Name="VCManifestTool" 
     401      /> 
     402      <Tool 
     403        Name="VCXDCMakeTool" 
     404      /> 
     405      <Tool 
     406        Name="VCBscMakeTool" 
     407      /> 
     408      <Tool 
     409        Name="VCFxCopTool" 
     410      /> 
     411      <Tool 
     412        Name="VCAppVerifierTool" 
     413      /> 
     414      <Tool 
     415        Name="VCWebDeploymentTool" 
     416      /> 
     417      <Tool 
     418        Name="VCPostBuildEventTool" 
     419      /> 
     420    </Configuration> 
     421    <Configuration 
    422422      Name="Distribution|x64" 
    423423      OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     
    499499      /> 
    500500    </Configuration> 
     501    <Configuration 
     502      Name="Nightly|Win32" 
     503      OutputDirectory="$(ConfigurationName)" 
     504      IntermediateDirectory="$(ConfigurationName)" 
     505      ConfigurationType="2" 
     506      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     507      CharacterSet="2" 
     508      > 
     509      <Tool 
     510        Name="VCPreBuildEventTool" 
     511      /> 
     512      <Tool 
     513        Name="VCCustomBuildTool" 
     514      /> 
     515      <Tool 
     516        Name="VCXMLDataGeneratorTool" 
     517      /> 
     518      <Tool 
     519        Name="VCWebServiceProxyGeneratorTool" 
     520      /> 
     521      <Tool 
     522        Name="VCMIDLTool" 
     523      /> 
     524      <Tool 
     525        Name="VCCLCompilerTool" 
     526        AdditionalIncludeDirectories="../include;../../include" 
     527        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     528        RuntimeLibrary="0" 
     529        UsePrecompiledHeader="2" 
     530        WarningLevel="3" 
     531        Detect64BitPortabilityProblems="true" 
     532        DebugInformationFormat="3" 
     533      /> 
     534      <Tool 
     535        Name="VCManagedResourceCompilerTool" 
     536      /> 
     537      <Tool 
     538        Name="VCResourceCompilerTool" 
     539      /> 
     540      <Tool 
     541        Name="VCPreLinkEventTool" 
     542      /> 
     543      <Tool 
     544        Name="VCLinkerTool" 
     545        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     546        LinkIncremental="1" 
     547        ModuleDefinitionFile="RemoteConfiguration.def" 
     548        GenerateDebugInformation="true" 
     549        SubSystem="2" 
     550        OptimizeReferences="2" 
     551        EnableCOMDATFolding="2" 
     552        ImportLibrary="$(OutDir)/RemoteConfiguration.lib" 
     553        TargetMachine="1" 
     554      /> 
     555      <Tool 
     556        Name="VCALinkTool" 
     557      /> 
     558      <Tool 
     559        Name="VCManifestTool" 
     560      /> 
     561      <Tool 
     562        Name="VCXDCMakeTool" 
     563      /> 
     564      <Tool 
     565        Name="VCBscMakeTool" 
     566      /> 
     567      <Tool 
     568        Name="VCFxCopTool" 
     569      /> 
     570      <Tool 
     571        Name="VCAppVerifierTool" 
     572      /> 
     573      <Tool 
     574        Name="VCWebDeploymentTool" 
     575      /> 
     576      <Tool 
     577        Name="VCPostBuildEventTool" 
     578      /> 
     579    </Configuration> 
     580    <Configuration 
     581      Name="Nightly|x64" 
     582      OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     583      IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" 
     584      ConfigurationType="2" 
     585      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     586      CharacterSet="2" 
     587      > 
     588      <Tool 
     589        Name="VCPreBuildEventTool" 
     590      /> 
     591      <Tool 
     592        Name="VCCustomBuildTool" 
     593      /> 
     594      <Tool 
     595        Name="VCXMLDataGeneratorTool" 
     596      /> 
     597      <Tool 
     598        Name="VCWebServiceProxyGeneratorTool" 
     599      /> 
     600      <Tool 
     601        Name="VCMIDLTool" 
     602        TargetEnvironment="3" 
     603      /> 
     604      <Tool 
     605        Name="VCCLCompilerTool" 
     606        AdditionalIncludeDirectories="../include;../../include" 
     607        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     608        RuntimeLibrary="2" 
     609        UsePrecompiledHeader="2" 
     610        WarningLevel="3" 
     611        Detect64BitPortabilityProblems="true" 
     612        DebugInformationFormat="3" 
     613      /> 
     614      <Tool 
     615        Name="VCManagedResourceCompilerTool" 
     616      /> 
     617      <Tool 
     618        Name="VCResourceCompilerTool" 
     619      /> 
     620      <Tool 
     621        Name="VCPreLinkEventTool" 
     622      /> 
     623      <Tool 
     624        Name="VCLinkerTool" 
     625        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     626        LinkIncremental="1" 
     627        ModuleDefinitionFile="RemoteConfiguration.def" 
     628        GenerateDebugInformation="true" 
     629        SubSystem="2" 
     630        OptimizeReferences="2" 
     631        EnableCOMDATFolding="2" 
     632        ImportLibrary="$(OutDir)/RemoteConfiguration.lib" 
     633        TargetMachine="17" 
     634      /> 
     635      <Tool 
     636        Name="VCALinkTool" 
     637      /> 
     638      <Tool 
     639        Name="VCManifestTool" 
     640      /> 
     641      <Tool 
     642        Name="VCXDCMakeTool" 
     643      /> 
     644      <Tool 
     645        Name="VCBscMakeTool" 
     646      /> 
     647      <Tool 
     648        Name="VCFxCopTool" 
     649      /> 
     650      <Tool 
     651        Name="VCAppVerifierTool" 
     652      /> 
     653      <Tool 
     654        Name="VCWebDeploymentTool" 
     655      /> 
     656      <Tool 
     657        Name="VCPostBuildEventTool" 
     658      /> 
     659    </Configuration> 
    501660  </Configurations> 
    502661  <References> 
     
    536695        </FileConfiguration> 
    537696        <FileConfiguration 
     697          Name="Debug|x64" 
     698          > 
     699          <Tool 
     700            Name="VCCLCompilerTool" 
     701            UsePrecompiledHeader="1" 
     702          /> 
     703        </FileConfiguration> 
     704        <FileConfiguration 
    538705          Name="Release|Win32" 
    539706          > 
     
    544711        </FileConfiguration> 
    545712        <FileConfiguration 
     713          Name="Release|x64" 
     714          > 
     715          <Tool 
     716            Name="VCCLCompilerTool" 
     717            UsePrecompiledHeader="1" 
     718          /> 
     719        </FileConfiguration> 
     720        <FileConfiguration 
    546721          Name="Distribution|Win32" 
    547722          > 
     
    552727        </FileConfiguration> 
    553728        <FileConfiguration 
     729          Name="Distribution|x64" 
     730          > 
     731          <Tool 
     732            Name="VCCLCompilerTool" 
     733            UsePrecompiledHeader="1" 
     734          /> 
     735        </FileConfiguration> 
     736        <FileConfiguration 
     737          Name="Nightly|Win32" 
     738          > 
     739          <Tool 
     740            Name="VCCLCompilerTool" 
     741            UsePrecompiledHeader="1" 
     742          /> 
     743        </FileConfiguration> 
     744        <FileConfiguration 
     745          Name="Nightly|x64" 
     746          > 
     747          <Tool 
     748            Name="VCCLCompilerTool" 
     749            UsePrecompiledHeader="1" 
     750          /> 
     751        </FileConfiguration> 
     752      </File> 
     753      <File 
     754        RelativePath="..\..\include\utils.cpp" 
     755        > 
     756        <FileConfiguration 
     757          Name="Debug|Win32" 
     758          > 
     759          <Tool 
     760            Name="VCCLCompilerTool" 
     761            UsePrecompiledHeader="0" 
     762          /> 
     763        </FileConfiguration> 
     764        <FileConfiguration 
    554765          Name="Debug|x64" 
    555766          > 
    556767          <Tool 
    557768            Name="VCCLCompilerTool" 
    558             UsePrecompiledHeader="1" 
     769            UsePrecompiledHeader="0" 
     770          /> 
     771        </FileConfiguration> 
     772        <FileConfiguration 
     773          Name="Release|Win32" 
     774          > 
     775          <Tool 
     776            Name="VCCLCompilerTool" 
     777            UsePrecompiledHeader="0" 
    559778          /> 
    560779        </FileConfiguration> 
     
    564783          <Tool 
    565784            Name="VCCLCompilerTool" 
    566             UsePrecompiledHeader="1" 
     785            UsePrecompiledHeader="0" 
     786          /> 
     787        </FileConfiguration> 
     788        <FileConfiguration 
     789          Name="Distribution|Win32" 
     790          > 
     791          <Tool 
     792            Name="VCCLCompilerTool" 
     793            UsePrecompiledHeader="0" 
    567794          /> 
    568795        </FileConfiguration> 
     
    572799          <Tool 
    573800            Name="VCCLCompilerTool" 
    574             UsePrecompiledHeader="1" 
    575           /> 
    576         </FileConfiguration> 
    577       </File> 
    578       <File 
    579         RelativePath="..\..\include\utils.cpp" 
    580         > 
    581         <FileConfiguration 
    582           Name="Debug|Win32" 
    583           > 
    584           <Tool 
    585             Name="VCCLCompilerTool" 
    586801            UsePrecompiledHeader="0" 
    587802          /> 
    588803        </FileConfiguration> 
    589804        <FileConfiguration 
    590           Name="Release|Win32" 
     805          Name="Nightly|Win32" 
    591806          > 
    592807          <Tool 
     
    596811        </FileConfiguration> 
    597812        <FileConfiguration 
    598           Name="Distribution|Win32" 
    599           > 
    600           <Tool 
    601             Name="VCCLCompilerTool" 
    602             UsePrecompiledHeader="0" 
    603           /> 
    604         </FileConfiguration> 
    605         <FileConfiguration 
    606           Name="Debug|x64" 
    607           > 
    608           <Tool 
    609             Name="VCCLCompilerTool" 
    610             UsePrecompiledHeader="0" 
    611           /> 
    612         </FileConfiguration> 
    613         <FileConfiguration 
    614           Name="Release|x64" 
    615           > 
    616           <Tool 
    617             Name="VCCLCompilerTool" 
    618             UsePrecompiledHeader="0" 
    619           /> 
    620         </FileConfiguration> 
    621         <FileConfiguration 
    622           Name="Distribution|x64" 
     813          Name="Nightly|x64" 
    623814          > 
    624815          <Tool 
  • modules/SysTray/SysTray.vcproj

    r9ce8b01 r2603350  
    4141        Name="VCCLCompilerTool" 
    4242        AdditionalIncludeDirectories="../include;../../include" 
    43         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    44         RuntimeLibrary="2" 
     43        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 
     44        RuntimeLibrary="0" 
    4545        UsePrecompiledHeader="2" 
    4646        WarningLevel="3" 
     
    6262        LinkIncremental="1" 
    6363        ModuleDefinitionFile="SysTray.def" 
    64         GenerateDebugInformation="true" 
     64        GenerateDebugInformation="false" 
    6565        SubSystem="2" 
    6666        OptimizeReferences="2" 
     
    200200        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    201201        RuntimeLibrary="2" 
     202        UsePrecompiledHeader="2" 
     203        WarningLevel="3" 
     204        Detect64BitPortabilityProblems="true" 
     205        DebugInformationFormat="3" 
     206      /> 
     207      <Tool 
     208        Name="VCManagedResourceCompilerTool" 
     209      /> 
     210      <Tool 
     211        Name="VCResourceCompilerTool" 
     212      /> 
     213      <Tool 
     214        Name="VCPreLinkEventTool" 
     215      /> 
     216      <Tool 
     217        Name="VCLinkerTool" 
     218        OutputFile="../../Dist/modules/$(ProjectName).dll" 
     219        LinkIncremental="1" 
     220        ModuleDefinitionFile="SysTray.def" 
     221        GenerateDebugInformation="true" 
     222        SubSystem="2" 
     223        OptimizeReferences="2" 
     224        EnableCOMDATFolding="2" 
     225        ImportLibrary="$(OutDir)/SysTray.lib" 
     226        TargetMachine="1" 
     227      /> 
     228      <Tool 
     229        Name="VCALinkTool" 
     230      /> 
     231      <Tool 
     232        Name="VCManifestTool" 
     233      /> 
     234      <Tool 
     235        Name="VCXDCMakeTool" 
     236      /> 
     237      <Tool 
     238        Name="VCBscMakeTool" 
     239      /> 
     240      <Tool 
     241        Name="VCFxCopTool" 
     242      /> 
     243      <Tool 
     244        Name="VCAppVerifierTool" 
     245      /> 
     246      <Tool 
     247        Name="VCWebDeploymentTool" 
     248      /> 
     249      <Tool 
     250        Name="VCPostBuildEventTool" 
     251      /> 
     252    </Configuration> 
     253    <Configuration 
     254      Name="Nightly|Win32" 
     255      OutputDirectory="$(ConfigurationName)" 
     256      IntermediateDirectory="$(ConfigurationName)" 
     257      ConfigurationType="2" 
     258      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     259      CharacterSet="2" 
     260      > 
     261      <Tool 
     262        Name="VCPreBuildEventTool" 
     263      /> 
     264      <Tool 
     265        Name="VCCustomBuildTool" 
     266      /> 
     267      <Tool 
     268        Name="VCXMLDataGeneratorTool" 
     269      /> 
     270      <Tool 
     271        Name="VCWebServiceProxyGeneratorTool" 
     272      /> 
     273      <Tool 
     274        Name="VCMIDLTool" 
     275      /> 
     276      <Tool 
     277        Name="VCCLCompilerTool" 
     278        AdditionalIncludeDirectories="../include;../../include" 
     279        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
     280        RuntimeLibrary="0" 
    202281        UsePrecompiledHeader="2" 
    203282        WarningLevel="3" 
     
    299378          /> 
    300379        </FileConfiguration> 
     380        <FileConfiguration 
     381          Name="Nightly|Win32" 
     382          > 
     383          <Tool 
     384            Name="VCCLCompilerTool" 
     385            UsePrecompiledHeader="1" 
     386          /> 
     387        </FileConfiguration> 
    301388      </File> 
    302389      <File 
Note: See TracChangeset for help on using the changeset viewer.