Changeset 2603350 in nscp
- Timestamp:
- 02/23/07 19:25:23 (6 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 2c34b97
- Parents:
- d48c31a
- Files:
-
- 27 edited
-
NSClient++.cpp (modified) (3 diffs)
-
NSClient++.h (modified) (1 diff)
-
changelog (modified) (2 diffs)
-
include/NSCHelper.cpp (modified) (5 diffs)
-
include/NSCHelper.h (modified) (1 diff)
-
include/Socket.h (modified) (6 diffs)
-
include/arrayBuffer.cpp (modified) (7 diffs)
-
include/arrayBuffer.h (modified) (1 diff)
-
include/checkHelpers.hpp (modified) (3 diffs)
-
include/config.h (modified) (3 diffs)
-
include/thread.h (modified) (3 diffs)
-
include/utils.h (modified) (1 diff)
-
modules/CheckDisk/CheckDisk.cpp (modified) (8 diffs)
-
modules/CheckEventLog/CheckEventLog.cpp (modified) (8 diffs)
-
modules/CheckHelpers/CheckHelpers.vcproj (modified) (5 diffs)
-
modules/CheckSystem/CheckSystem.cpp (modified) (20 diffs)
-
modules/CheckSystem/PDHCollector.cpp (modified) (1 diff)
-
modules/CheckWMI/CheckWMI.vcproj (modified) (5 diffs)
-
modules/FileLogger/FileLogger.vcproj (modified) (4 diffs)
-
modules/NRPEListener/NRPEListener.cpp (modified) (7 diffs)
-
modules/NRPEListener/NRPEListener.h (modified) (1 diff)
-
modules/NRPEListener/NRPEListener.vcproj (modified) (7 diffs)
-
modules/NSClientListener/NSClientListener.cpp (modified) (1 diff)
-
modules/NSClientListener/NSClientListener.h (modified) (1 diff)
-
modules/NSClientListener/NSClientListener.vcproj (modified) (5 diffs)
-
modules/RemoteConfiguration/RemoteConfiguration.vcproj (modified) (10 diffs)
-
modules/SysTray/SysTray.vcproj (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
NSClient++.cpp
r1a22e52 r2603350 380 380 switch (c) { 381 381 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."); 383 383 return c; 384 384 case NSCAPI::returnIgnored: … … 521 521 return NSCAPI::isSuccess; 522 522 } 523 NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(char*** aBuffer, unsigned int * bufLen) { 524 arrayBuffer::destroyArrayBuffer(*aBuffer, *bufLen); 525 *bufLen = 0; 526 *aBuffer = NULL; 527 return NSCAPI::isSuccess; 528 } 523 529 524 530 NSCAPI::boolReturn NSAPICheckLogMessages(int messageType) { … … 651 657 652 658 LPVOID NSAPILoader(char*buffer) { 653 if ( stricmp(buffer, "NSAPIGetApplicationName") == 0)659 if (_stricmp(buffer, "NSAPIGetApplicationName") == 0) 654 660 return &NSAPIGetApplicationName; 655 if ( stricmp(buffer, "NSAPIGetApplicationVersionStr") == 0)661 if (_stricmp(buffer, "NSAPIGetApplicationVersionStr") == 0) 656 662 return &NSAPIGetApplicationVersionStr; 657 if (stricmp(buffer, "NSAPIGetSettingsSection") == 0) 663 if (_stricmp(buffer, "NSAPIGetSettingsString") == 0) 664 return &NSAPIGetSettingsString; 665 if (_stricmp(buffer, "NSAPIGetSettingsSection") == 0) 658 666 return &NSAPIGetSettingsSection; 659 if ( stricmp(buffer, "NSAPIGetSettingsString") == 0)660 return &NSAPI GetSettingsString;661 if ( stricmp(buffer, "NSAPIGetSettingsInt") == 0)667 if (_stricmp(buffer, "NSAPIReleaseSettingsSectionBuffer") == 0) 668 return &NSAPIReleaseSettingsSectionBuffer; 669 if (_stricmp(buffer, "NSAPIGetSettingsInt") == 0) 662 670 return &NSAPIGetSettingsInt; 663 if ( stricmp(buffer, "NSAPIMessage") == 0)671 if (_stricmp(buffer, "NSAPIMessage") == 0) 664 672 return &NSAPIMessage; 665 if ( stricmp(buffer, "NSAPIStopServer") == 0)673 if (_stricmp(buffer, "NSAPIStopServer") == 0) 666 674 return &NSAPIStopServer; 667 if ( stricmp(buffer, "NSAPIInject") == 0)675 if (_stricmp(buffer, "NSAPIInject") == 0) 668 676 return &NSAPIInject; 669 if ( stricmp(buffer, "NSAPIGetBasePath") == 0)677 if (_stricmp(buffer, "NSAPIGetBasePath") == 0) 670 678 return &NSAPIGetBasePath; 671 if ( stricmp(buffer, "NSAPICheckLogMessages") == 0)679 if (_stricmp(buffer, "NSAPICheckLogMessages") == 0) 672 680 return &NSAPICheckLogMessages; 673 if ( stricmp(buffer, "NSAPIEncrypt") == 0)681 if (_stricmp(buffer, "NSAPIEncrypt") == 0) 674 682 return &NSAPIEncrypt; 675 if ( stricmp(buffer, "NSAPIDecrypt") == 0)683 if (_stricmp(buffer, "NSAPIDecrypt") == 0) 676 684 return &NSAPIDecrypt; 677 if ( stricmp(buffer, "NSAPISetSettingsString") == 0)685 if (_stricmp(buffer, "NSAPISetSettingsString") == 0) 678 686 return &NSAPISetSettingsString; 679 if ( stricmp(buffer, "NSAPISetSettingsInt") == 0)687 if (_stricmp(buffer, "NSAPISetSettingsInt") == 0) 680 688 return &NSAPISetSettingsInt; 681 if ( stricmp(buffer, "NSAPIWriteSettings") == 0)689 if (_stricmp(buffer, "NSAPIWriteSettings") == 0) 682 690 return &NSAPIWriteSettings; 683 if ( stricmp(buffer, "NSAPIReadSettings") == 0)691 if (_stricmp(buffer, "NSAPIReadSettings") == 0) 684 692 return &NSAPIReadSettings; 685 if ( stricmp(buffer, "NSAPIRehash") == 0)693 if (_stricmp(buffer, "NSAPIRehash") == 0) 686 694 return &NSAPIRehash; 687 695 return NULL; -
NSClient++.h
r1a22e52 r2603350 100 100 NSCAPI::nagiosReturn NSAPIInject(const char* command, const unsigned int argLen, char **argument, char *returnMessageBuffer, unsigned int returnMessageBufferLen, char *returnPerfBuffer, unsigned int returnPerfBufferLen); 101 101 NSCAPI::errorReturn NSAPIGetSettingsSection(const char*, char***, unsigned int *); 102 NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(char*** aBuffer, unsigned int * bufLen); 102 103 NSCAPI::boolReturn NSAPICheckLogMessages(int messageType); 103 104 NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const char* inBuffer, unsigned int inBufLen, char* outBuf, unsigned int *outBufLen); -
changelog
rd48c31a r2603350 3 3 * Fix configuration GUI (low priority) 4 4 * Fix installer (after configuration UI) 5 * Service check to use Auto (filter by started setting etc.)6 5 * Add module for relaying events 7 6 * Add filtering to WMI module … … 10 9 * Add API for rehashing the daemon (or implement it the API is there but does nothing) 11 10 * Add option to recheck DNS in real time 11 12 2006-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 23 2006-02-21 MickeM 24 * Fixed "broken password check" (again) in NSClient listener (this time it is correct! :) 12 25 13 26 2006-12-02 MickeM -
include/NSCHelper.cpp
r76aafc4 r2603350 102 102 lpNSAPIGetApplicationVersionStr fNSAPIGetApplicationVersionStr = NULL; 103 103 lpNSAPIGetSettingsSection fNSAPIGetSettingsSection = NULL; 104 lpNSAPIReleaseSettingsSectionBuffer fNSAPIReleaseSettingsSectionBuffer = NULL; 104 105 lpNSAPIGetSettingsString fNSAPIGetSettingsString = NULL; 105 106 lpNSAPIGetSettingsInt fNSAPIGetSettingsInt = NULL; … … 289 290 if (!fNSAPIGetSettingsSection) 290 291 throw NSCMHExcpetion("NSCore has not been initiated..."); 291 char **aBuffer = NULL;292 arrayBuffer::arrayBuffer aBuffer = NULL; 292 293 unsigned int argLen = 0; 293 294 if (fNSAPIGetSettingsSection(section.c_str(), &aBuffer, &argLen) != NSCAPI::isSuccess) { … … 295 296 } 296 297 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); 298 302 return ret; 299 303 } … … 502 506 NSCModuleHelper::fNSAPIGetSettingsString = (NSCModuleHelper::lpNSAPIGetSettingsString)f("NSAPIGetSettingsString"); 503 507 NSCModuleHelper::fNSAPIGetSettingsSection = (NSCModuleHelper::lpNSAPIGetSettingsSection)f("NSAPIGetSettingsSection"); 508 NSCModuleHelper::fNSAPIReleaseSettingsSectionBuffer = (NSCModuleHelper::lpNSAPIReleaseSettingsSectionBuffer)f("NSAPIReleaseSettingsSectionBuffer"); 504 509 NSCModuleHelper::fNSAPIMessage = (NSCModuleHelper::lpNSAPIMessage)f("NSAPIMessage"); 505 510 NSCModuleHelper::fNSAPIStopServer = (NSCModuleHelper::lpNSAPIStopServer)f("NSAPIStopServer"); … … 521 526 * @param bufLen Length of buffer 522 527 * @param str String to store inside the buffer 523 * @ return buffercopy status528 * @ copy status 524 529 */ 525 530 NSCAPI::errorReturn NSCModuleWrapper::wrapGetModuleName(char* buf, unsigned int bufLen, std::string str) { -
include/NSCHelper.h
r76aafc4 r2603350 79 79 typedef NSCAPI::errorReturn (*lpNSAPIGetSettingsString)(const char*,const char*,const char*,char*,unsigned int); 80 80 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 *); 82 83 typedef void (*lpNSAPIMessage)(int, const char*, const int, const char*); 83 84 typedef NSCAPI::errorReturn (*lpNSAPIStopServer)(void); -
include/Socket.h
r0687108 r2603350 103 103 return ::inet_addr(addr.c_str()); 104 104 } 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 } 105 110 static std::string getHostByName(std::string ip) { 106 111 hostent* remoteHost; … … 109 114 throw SocketException("gethostbyname failed for " + ip + ": ", ::WSAGetLastError()); 110 115 // @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)); 112 117 } 113 118 static std::string getHostByAddr(std::string ip) { … … 165 170 } 166 171 virtual std::string getAddrString() { 167 return inet_ntoa(from_.sin_addr);172 return ::inet_ntoa(from_.sin_addr); 168 173 } 169 174 virtual void printError(std::string file, int line, std::string error); … … 424 429 core->setAddr(AF_INET, core->bindAddres_, htons(core->bindPort_)); 425 430 core->bind(); 431 NSC_DEBUG_MSG_STD("Bound to: " + TListenerType::inet_ntoa(core->bindAddres_) + ":" + strEx::itos(core->bindPort_)); 426 432 if (core->listenQue_ != 0) 427 433 core->listen(core->listenQue_); … … 429 435 core->listen(); 430 436 core->setNonBlock(); 437 NSC_DEBUG_MSG_STD("Socket ready..."); 431 438 while (!(WaitForSingleObject(hStopEvent_, 100) == WAIT_OBJECT_0)) { 432 439 try { … … 442 449 core->printError(__FILE__, __LINE__, e.getMessage()); 443 450 } 451 NSC_DEBUG_MSG_STD("Listener is preparing to shutdown..."); 444 452 core->shutdown(SD_BOTH); 445 453 core->close(); -
include/arrayBuffer.cpp
r9ce8b01 r2603350 27 27 * @return A pointer that is managed by the caller. 28 28 */ 29 char **arrayBuffer::list2arrayBuffer(const arrayList lst, unsigned int &argLen) {29 arrayBuffer::arrayBuffer arrayBuffer::list2arrayBuffer(const arrayList lst, unsigned int &argLen) { 30 30 argLen = static_cast<unsigned int>(lst.size()); 31 char **arrayBuffer = new char*[argLen];31 arrayBuffer::arrayBuffer arrayBuffer = new arrayBuffer::arrayBufferItem[argLen]; 32 32 arrayList::const_iterator it = lst.begin(); 33 33 int i; … … 45 45 * @return The arrayBuffer 46 46 */ 47 char **arrayBuffer::createEmptyArrayBuffer(unsigned int &argLen) {47 arrayBuffer::arrayBuffer arrayBuffer::createEmptyArrayBuffer(unsigned int &argLen) { 48 48 argLen = 0; 49 char **arrayBuffer = new char*[0];49 arrayBuffer::arrayBuffer arrayBuffer = new arrayBuffer::arrayBufferItem[0]; 50 50 return arrayBuffer; 51 51 } … … 57 57 * @return The joined arrayBuffer 58 58 */ 59 std::string arrayBuffer::arrayBuffer2string( char **argument, const unsigned int argLen, std::string join) {59 std::string arrayBuffer::arrayBuffer2string(arrayBuffer::arrayBuffer argument, const unsigned int argLen, std::string join) { 60 60 std::string ret; 61 61 for (unsigned int i=0;i<argLen;i++) { … … 73 73 * @return The arrayBuffer 74 74 */ 75 char **arrayBuffer::split2arrayBuffer(const char* buffer, char splitChar, unsigned int &argLen) {75 arrayBuffer::arrayBuffer arrayBuffer::split2arrayBuffer(const char* buffer, char splitChar, unsigned int &argLen) { 76 76 assert(buffer); 77 77 argLen = 0; … … 105 105 * @return The arrayBuffer 106 106 */ 107 char **arrayBuffer::split2arrayBuffer(const std::string inBuf, char splitChar, unsigned int &argLen) {107 arrayBuffer::arrayBuffer arrayBuffer::split2arrayBuffer(const std::string inBuf, char splitChar, unsigned int &argLen) { 108 108 if (inBuf.empty()) 109 109 return createEmptyArrayBuffer(argLen); … … 115 115 p = inBuf.find(splitChar, p+1); 116 116 } 117 char **arrayBuffer = new char*[argLen];117 arrayBuffer::arrayBuffer arrayBuffer = new arrayBuffer::arrayBufferItem[argLen]; 118 118 p = inBuf.find(splitChar); 119 119 std::string::size_type l = 0; … … 139 139 * @param argLen 140 140 */ 141 void arrayBuffer::destroyArrayBuffer( char **argument, const unsigned int argLen) {141 void arrayBuffer::destroyArrayBuffer(arrayBuffer::arrayBuffer argument, const unsigned int argLen) { 142 142 for (unsigned int i=0;i<argLen;i++) { 143 143 delete [] argument[i]; -
include/arrayBuffer.h
r1e62ed5 r2603350 26 26 */ 27 27 namespace arrayBuffer { 28 typedef char* arrayBufferItem; 29 typedef arrayBufferItem* arrayBuffer; 28 30 typedef std::list<std::string> arrayList; 29 31 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); 33 35 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); 36 38 37 39 #ifdef _DEBUG -
include/checkHelpers.hpp
r6817602 r2603350 54 54 55 55 showType show; 56 57 58 CheckConatiner() : show(showUnknown) 56 bool perfData; 57 58 59 CheckConatiner() : show(showUnknown), perfData(true) 59 60 {} 60 61 CheckConatiner(std::string data_, TContents warn_, TContents crit_) … … 97 98 tstr = getAlias() + ": " + TContents::toStringShort(value); 98 99 } 99 perf += gatherPerfData(value); 100 if (perfData) 101 perf += gatherPerfData(value); 100 102 if (!message.empty() && !tstr.empty()) 101 103 message += ", "; … … 671 673 typedef MaxMinBounds<NumericBounds<int, int_handler> > MaxMinBoundsInteger; 672 674 typedef MaxMinBounds<NumericBounds<unsigned int, int_handler> > MaxMinBoundsUInteger; 675 typedef MaxMinBounds<NumericBounds<unsigned long int, int_handler> > MaxMinBoundsULongInteger; 673 676 typedef MaxMinBounds<NumericBounds<disk_size_type, disk_size_handler<disk_size_type> > > MaxMinBoundsDiscSize; 674 677 typedef MaxMinBounds<NumericBounds<time_type, time_handler<time_type> > > MaxMinBoundsTime; -
include/config.h
r0687108 r2603350 5 5 6 6 // Version 7 #define SZVERSION "0.2. 6 2006-11-18"7 #define SZVERSION "0.2.7 2007-02-22" 8 8 9 9 // internal name of the service … … 31 31 #define SHOW_FAIL "ShowFail" 32 32 #define NSCLIENT "nsclient" 33 #define IGNORE_PERFDATA "ignore-perf-data" 33 34 #define CHECK_ALL "CheckAll" 34 35 #define CHECK_ALL_OTHERS "CheckAllOthers" … … 62 63 #define NRPE_SETTINGS_LISTENQUE "socket_back_log" 63 64 #define NRPE_SETTINGS_LISTENQUE_DEFAULT 0 65 #define NRPE_SETTINGS_PERFDATA "performance_data" 66 #define NRPE_SETTINGS_PERFDATA_DEFAULT 1 64 67 65 68 // Check System Settings -
include/thread.h
r0687108 r2603350 182 182 throw ThreadException("Could not retrieve mutex, thread (" + threadid_ + ") not stopped..."); 183 183 } 184 if (bThreadHasTerminated||bThreadHasBeenClosed) 185 return false; 184 186 return pObject_ != NULL; 185 187 } … … 189 191 throw ThreadException("Could not retrieve mutex, thread (" + threadid_ + ") not stopped..."); 190 192 } 193 if (bThreadHasTerminated||bThreadHasBeenClosed) 194 return NULL; 191 195 return pObject_; 192 196 } … … 196 200 throw ThreadException("Could not retrieve mutex, thread (" + threadid_ + ") not stopped..."); 197 201 } 202 if (bThreadHasTerminated||bThreadHasBeenClosed) 203 return NULL; 198 204 return pObject_; 199 205 } -
include/utils.h
r6817602 r2603350 40 40 #define MAP_OPTIONS_PUSH(value, list) \ 41 41 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); } 42 44 #define MAP_OPTIONS_DO(action) \ 43 45 else if (p__.first == value) { action; } -
modules/CheckDisk/CheckDisk.cpp
rd48c31a r2603350 103 103 bool bCheckAllOthers = false; 104 104 bool bNSClient = false; 105 bool bPerfData = true; 105 106 std::list<DriveConatiner> drives; 106 107 … … 113 114 MAP_OPTIONS_BOOL_VALUE("FilterType", bFilterRemovable, "REMOVABLE") 114 115 MAP_OPTIONS_BOOL_VALUE("FilterType", bFilterRemote, "REMOTE") 116 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 115 117 MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 116 118 MAP_OPTIONS_BOOL_TRUE(CHECK_ALL, bCheckAll) … … 183 185 if (drive.data.length() == 1) 184 186 drive.data += ":"; 187 if (!bPerfData) 188 drive.perfData = false; 185 189 UINT drvType = GetDriveType(drive.data.c_str()); 186 190 … … 231 235 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 232 236 std::list<std::string> args = arrayBuffer::arrayBuffer2list(argLen, char_args); 237 bool bPerfData = true; 233 238 if (args.empty()) { 234 239 message = "Missing argument(s)."; … … 245 250 MAP_OPTIONS_STR("MaxCrit", tmpObject.crit.max) 246 251 MAP_OPTIONS_STR("MinCrit", tmpObject.crit.min) 252 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 247 253 MAP_OPTIONS_SECONDARY_BEGIN(":", p2) 248 254 else if (p2.first == "File") { … … 263 269 recursive_scan<get_size>(path.data, sizeFinder); 264 270 path.setDefault(tmpObject); 271 if (!bPerfData) 272 path.perfData = false; 265 273 266 274 checkHolders::disk_size_type size = sizeFinder.getSize(); … … 456 464 CheckFileConatiner query; 457 465 std::string syntax = "%filename%"; 466 bool bPerfData = true; 458 467 459 468 try { … … 461 470 MAP_OPTIONS_NUMERIC_ALL(query, "") 462 471 MAP_OPTIONS_STR2INT("truncate", truncate) 472 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 463 473 MAP_OPTIONS_STR("syntax", syntax) 464 474 MAP_OPTIONS_PUSH("path", paths) -
modules/CheckEventLog/CheckEventLog.cpp
rf42280d r2603350 193 193 194 194 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)); } 197 197 198 198 … … 201 201 if (command != "CheckEventLog") 202 202 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; 204 206 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 205 207 std::list<std::string> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 206 208 207 209 std::list<std::string> files; 208 std::list<eventlog_filter>filter_chain;210 filterlist_type filter_chain; 209 211 EventLogQueryConatiner query; 210 212 213 bool bPerfData = true; 211 214 bool bFilterIn = true; 212 215 bool bFilterAll = false; 216 bool bFilterNew = false; 213 217 bool bShowDescriptions = false; 214 218 unsigned int truncate = 0; 215 219 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; 216 224 217 225 try { … … 221 229 MAP_OPTIONS_BOOL_TRUE("descriptions", bShowDescriptions) 222 230 MAP_OPTIONS_PUSH("file", files) 231 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 232 MAP_OPTIONS_BOOL_EX("filter", bFilterNew, "new", "old") 223 233 MAP_OPTIONS_BOOL_EX("filter", bFilterIn, "in", "out") 224 234 MAP_OPTIONS_BOOL_EX("filter", bFilterAll, "all", "any") 225 235 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 233 269 MAP_OPTIONS_MISSING(message, "Unknown argument: ") 234 270 MAP_OPTIONS_END() … … 241 277 } 242 278 243 unsigned int hit_count = 0;279 unsigned long int hit_count = 0; 244 280 245 281 for (std::list<std::string>::const_iterator cit2 = files.begin(); cit2 != files.end(); ++cit2) { … … 250 286 } 251 287 252 DWORD dwThisRecord, dwRead, dwNeeded; 288 //DWORD dwThisRecord; 289 DWORD dwRead, dwNeeded; 253 290 EVENTLOGRECORD *pevlr; 254 291 BYTE bBuffer[BUFFER_SIZE]; … … 259 296 _time64(<ime); 260 297 261 GetOldestEventLogRecord(hLog, &dwThisRecord);298 //GetOldestEventLogRecord(hLog, &dwThisRecord); 262 299 263 300 while (ReadEventLog(hLog, EVENTLOG_FORWARDS_READ|EVENTLOG_SEQUENTIAL_READ, … … 269 306 EventLogRecord record(pevlr, ltime); 270 307 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! 275 326 bMatch = false; 276 327 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) { 280 333 bMatch = true; 281 break;282 334 } 283 335 } 284 336 } 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) { 287 345 if (!syntax.empty()) { 288 346 strEx::append_list(message, record.render(syntax)); 289 } else if ( bShowDescriptions) {347 } else if (!bShowDescriptions) { 290 348 strEx::append_list(message, record.eventSource()); 291 349 } else { … … 304 362 CloseEventLog(hLog); 305 363 } 364 365 if (!bPerfData) 366 query.perfData = false; 306 367 query.runCheck(hit_count, returnCode, message, perf); 307 368 if ((truncate > 0) && (message.length() > (truncate-4))) -
modules/CheckHelpers/CheckHelpers.vcproj
r9ce8b01 r2603350 122 122 Name="VCCLCompilerTool" 123 123 AdditionalIncludeDirectories="../include;../../include" 124 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS "125 RuntimeLibrary=" 2"124 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 125 RuntimeLibrary="0" 126 126 UsePrecompiledHeader="2" 127 127 WarningLevel="3" … … 143 143 LinkIncremental="1" 144 144 ModuleDefinitionFile="CheckHelpers.def" 145 GenerateDebugInformation=" true"145 GenerateDebugInformation="false" 146 146 SubSystem="2" 147 147 OptimizeReferences="2" … … 254 254 /> 255 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" 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> 256 335 </Configurations> 257 336 <References> … … 306 385 /> 307 386 </FileConfiguration> 387 <FileConfiguration 388 Name="Nightly|Win32" 389 > 390 <Tool 391 Name="VCCLCompilerTool" 392 UsePrecompiledHeader="1" 393 /> 394 </FileConfiguration> 308 395 </File> 309 396 <File … … 328 415 <FileConfiguration 329 416 Name="Distribution|Win32" 417 > 418 <Tool 419 Name="VCCLCompilerTool" 420 UsePrecompiledHeader="0" 421 /> 422 </FileConfiguration> 423 <FileConfiguration 424 Name="Nightly|Win32" 330 425 > 331 426 <Tool -
modules/CheckSystem/CheckSystem.cpp
rd48c31a r2603350 10 10 #include <checkHelpers.hpp> 11 11 #include <map> 12 #include <set> 12 13 #include <sysinfo.h> 13 14 … … 309 310 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 310 311 bool bNSClient = false; 312 bool bPerfData = true; 311 313 CPULoadConatiner tmpObject; 312 314 … … 317 319 MAP_OPTIONS_STR("warn", tmpObject.warn.max) 318 320 MAP_OPTIONS_STR("crit", tmpObject.crit.max) 321 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 319 322 MAP_OPTIONS_STR_AND("time", tmpObject.data, list.push_back(tmpObject)) 320 323 MAP_OPTIONS_STR_AND("Time", tmpObject.data, list.push_back(tmpObject)) … … 349 352 } else { 350 353 load.setDefault(tmpObject); 354 if (!bPerfData) 355 load.perfData = false; 351 356 load.runCheck(value, returnCode, msg, perf); 352 357 } … … 371 376 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 372 377 bool bNSClient = false; 378 bool bPerfData = true; 373 379 UpTimeConatiner bounds; 374 380 … … 379 385 MAP_OPTIONS_STR("warn", bounds.warn.min) 380 386 MAP_OPTIONS_STR("crit", bounds.crit.min) 387 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 381 388 MAP_OPTIONS_STR("Alias", bounds.data) 382 389 MAP_OPTIONS_SHOWALL(bounds) … … 396 403 } else { 397 404 value *= 1000; 405 if (!bPerfData) 406 bounds.perfData = false; 398 407 bounds.runCheck(value, returnCode, msg, perf); 399 408 } … … 441 450 } 442 451 std::list<StateConatiner> list; 452 std::set<std::string> excludeList; 443 453 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 444 454 bool bNSClient = false; 445 455 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 //{{ 450 462 MAP_OPTIONS_BEGIN(stl_args) 451 463 MAP_OPTIONS_SHOWALL(tmpObject) 452 464 MAP_OPTIONS_STR("Alias", tmpObject.data) 465 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 453 466 MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 467 MAP_OPTIONS_BOOL_TRUE("CheckAll", bAutoStart) 468 MAP_OPTIONS_INSERT("exclude", excludeList) 454 469 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 }460 470 MAP_OPTIONS_MISSING_EX(p2, msg, "Unknown argument: ") 461 471 MAP_OPTIONS_SECONDARY_END() … … 469 479 } 470 480 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 } 472 502 for (std::list<StateConatiner>::iterator it = list.begin(); it != list.end(); ++it) { 473 503 TNtServiceInfo info; … … 509 539 else 510 540 value = checkHolders::state_none; 541 if (!bPerfData) 542 (*it).perfData = false; 511 543 (*it).runCheck(value, returnCode, msg, perf); 512 544 } … … 542 574 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 543 575 bool bShowAll = false; 576 bool bPerfData = true; 544 577 bool bNSClient = false; 545 578 MemoryConatiner bounds; … … 551 584 MAP_OPTIONS_STR("Alias", bounds.data) 552 585 MAP_OPTIONS_SHOWALL(bounds) 586 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 553 587 MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 554 588 MAP_OPTIONS_MODE("type", "paged", type, tPaged) … … 603 637 return NSCAPI::returnOK; 604 638 } else { 639 if (!bPerfData) 640 bounds.perfData = false; 605 641 bounds.runCheck(value, returnCode, msg, perf); 606 642 } … … 668 704 bool bNSClient = false; 669 705 StateConatiner tmpObject; 706 bool bPerfData = true; 670 707 671 708 tmpObject.data = "uptime"; … … 676 713 MAP_OPTIONS_STR("Alias", tmpObject.alias) 677 714 MAP_OPTIONS_SHOWALL(tmpObject) 715 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 678 716 MAP_OPTIONS_BOOL_TRUE(NSCLIENT, bNSClient) 679 717 MAP_OPTIONS_SECONDARY_BEGIN(":", p2) … … 713 751 if (bFound && (*it).showAll()) { 714 752 if (!msg.empty()) msg += " - "; 715 msg += (*it).data + ": Started";753 msg += (*it).data + ": Running"; 716 754 } else if (bFound) { 717 755 } else { 718 756 if (!msg.empty()) msg += " - "; 719 msg += (*it).data + ": Stopped";757 msg += (*it).data + ": not running"; 720 758 NSCHelper::escalteReturnCodeToCRIT(returnCode); 721 759 } … … 729 767 value.state = checkHolders::state_stopped; 730 768 } 769 if (!bPerfData) 770 (*it).perfData = false; 731 771 (*it).runCheck(value, returnCode, msg, perf); 732 772 } … … 765 805 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 766 806 bool bNSClient = false; 807 bool bPerfData = true; 767 808 /* average maax */ 768 809 bool bCheckAverages = true; … … 776 817 MAP_OPTIONS_STR("MaxCrit", tmpObject.crit.max) 777 818 MAP_OPTIONS_STR("MinCrit", tmpObject.crit.min) 819 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 778 820 MAP_OPTIONS_STR("Alias", tmpObject.data) 779 821 MAP_OPTIONS_SHOWALL(tmpObject) … … 815 857 msg += strEx::itos(value); 816 858 } else { 859 if (!bPerfData) 860 counter.perfData = false; 817 861 counter.setDefault(tmpObject); 818 862 counter.runCheck(value, returnCode, msg, perf); -
modules/CheckSystem/PDHCollector.cpp
rd48c31a r2603350 45 45 * @author mickem 46 46 * 47 * @date 03-13-2004 47 * @date 03-13-2004 48 48 * 49 49 * @bug If we have "custom named" counters ? -
modules/CheckWMI/CheckWMI.vcproj
r9ce8b01 r2603350 124 124 Name="VCCLCompilerTool" 125 125 AdditionalIncludeDirectories="../include;../../include" 126 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS "127 RuntimeLibrary=" 2"126 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 127 RuntimeLibrary="0" 128 128 UsePrecompiledHeader="2" 129 129 WarningLevel="3" … … 147 147 AdditionalLibraryDirectories="" 148 148 ModuleDefinitionFile="CheckWMI.def" 149 GenerateDebugInformation=" true"149 GenerateDebugInformation="false" 150 150 SubSystem="2" 151 151 OptimizeReferences="2" … … 260 260 /> 261 261 </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> 262 343 </Configurations> 263 344 <References> … … 308 389 /> 309 390 </FileConfiguration> 391 <FileConfiguration 392 Name="Nightly|Win32" 393 > 394 <Tool 395 Name="VCCLCompilerTool" 396 UsePrecompiledHeader="1" 397 /> 398 </FileConfiguration> 310 399 </File> 311 400 <File … … 330 419 <FileConfiguration 331 420 Name="Distribution|Win32" 421 > 422 <Tool 423 Name="VCCLCompilerTool" 424 UsePrecompiledHeader="0" 425 /> 426 </FileConfiguration> 427 <FileConfiguration 428 Name="Nightly|Win32" 332 429 > 333 430 <Tool -
modules/FileLogger/FileLogger.vcproj
r9ce8b01 r2603350 41 41 Name="VCCLCompilerTool" 42 42 AdditionalIncludeDirectories="../include;../../include" 43 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS "44 RuntimeLibrary=" 2"43 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 44 RuntimeLibrary="0" 45 45 UsePrecompiledHeader="2" 46 46 WarningLevel="3" … … 62 62 LinkIncremental="1" 63 63 ModuleDefinitionFile="FileLogger.def" 64 GenerateDebugInformation=" true"64 GenerateDebugInformation="false" 65 65 SubSystem="2" 66 66 OptimizeReferences="2" … … 203 203 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 204 204 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" 205 284 UsePrecompiledHeader="2" 206 285 WarningLevel="3" … … 302 381 /> 303 382 </FileConfiguration> 383 <FileConfiguration 384 Name="Nightly|Win32" 385 > 386 <Tool 387 Name="VCCLCompilerTool" 388 UsePrecompiledHeader="1" 389 /> 390 </FileConfiguration> 304 391 </File> 305 392 </Filter> -
modules/NRPEListener/NRPEListener.cpp
r0687108 r2603350 17 17 } 18 18 19 NRPEListener::NRPEListener() {19 NRPEListener::NRPEListener() : noPerfData_(false) { 20 20 } 21 21 NRPEListener::~NRPEListener() { … … 37 37 bool NRPEListener::loadModule() { 38 38 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; 39 40 timeout = NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_TIMEOUT ,NRPE_SETTINGS_TIMEOUT_DEFAULT); 40 41 std::list<std::string> commands = NSCModuleHelper::getSettingsSection(NRPE_HANDLER_SECTION_TITLE); … … 131 132 } 132 133 133 if ((str. substr(0,6) == "inject")&&(str.length() > 7)) {134 if ((str.length() > 7)&&(str.substr(0,6) == "inject")) { 134 135 strEx::token t = strEx::getToken(str.substr(7), ' '); 135 136 std::string s = t.second; … … 153 154 else 154 155 pEnd = s.length()-1; 155 156 if (p != std::string::npos) { 157 p++; 158 } 156 159 } else { 157 160 pEnd = p = s.find(' ', ++p); 161 if (p != std::string::npos) { 162 p = s.find_first_not_of(' ', p); 163 } 158 164 } 159 165 if (!sTarget.empty()) … … 167 173 } 168 174 sTarget += s.substr(pStart,pEnd-pStart); 169 p++;175 //p++; 170 176 } 171 177 return NSCModuleHelper::InjectSplitAndCommand(t.first, sTarget, '!', message, perf); … … 332 338 if (NSCModuleHelper::getSettingsInt(NRPE_SECTION_TITLE, NRPE_SETTINGS_ALLOW_ARGUMENTS, NRPE_SETTINGS_ALLOW_ARGUMENTS_DEFAULT) == 0) { 333 339 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)."); 336 342 } 337 343 } … … 348 354 349 355 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_) { 351 375 return NRPEPacket(NRPEPacket::responsePacket, NRPEPacket::version2, ret, msg); 352 376 } else { -
modules/NRPEListener/NRPEListener.h
re26cfe0 r2603350 14 14 unsigned int timeout; 15 15 socketHelpers::allowedHosts allowedHosts; 16 bool noPerfData_; 16 17 17 18 public: -
modules/NRPEListener/NRPEListener.vcproj
r9ce8b01 r2603350 45 45 MinimalRebuild="true" 46 46 BasicRuntimeChecks="3" 47 RuntimeLibrary=" 3"47 RuntimeLibrary="1" 48 48 UsePrecompiledHeader="2" 49 49 WarningLevel="3" … … 65 65 OutputFile="../../Debug/modules/$(ProjectName).dll" 66 66 LinkIncremental="2" 67 AdditionalLibraryDirectories=" "C:\Source\openssl-0.9.7f\out32dll.dbg""67 AdditionalLibraryDirectories="" 68 68 ModuleDefinitionFile="NRPEListener.def" 69 69 GenerateDebugInformation="true" … … 124 124 Name="VCCLCompilerTool" 125 125 AdditionalIncludeDirectories="../include;../../include" 126 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS "127 RuntimeLibrary=" 2"126 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 127 RuntimeLibrary="0" 128 128 UsePrecompiledHeader="2" 129 129 WarningLevel="3" … … 147 147 AdditionalLibraryDirectories=""C:\Source\openssl-0.9.7f\out32dll"" 148 148 ModuleDefinitionFile="NRPEListener.def" 149 GenerateDebugInformation=" true"149 GenerateDebugInformation="false" 150 150 SubSystem="2" 151 151 OptimizeReferences="2" … … 259 259 /> 260 260 </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> 261 341 </Configurations> 262 342 <References> … … 323 403 /> 324 404 </FileConfiguration> 405 <FileConfiguration 406 Name="Nightly|Win32" 407 > 408 <Tool 409 Name="VCCLCompilerTool" 410 UsePrecompiledHeader="1" 411 /> 412 </FileConfiguration> 325 413 </File> 326 414 <File … … 345 433 <FileConfiguration 346 434 Name="Distribution|Win32" 435 > 436 <Tool 437 Name="VCCLCompilerTool" 438 UsePrecompiledHeader="0" 439 /> 440 </FileConfiguration> 441 <FileConfiguration 442 Name="Nightly|Win32" 347 443 > 348 444 <Tool -
modules/NSClientListener/NSClientListener.cpp
rd48c31a r2603350 110 110 return password; 111 111 } 112 bool 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 } 112 122 113 123 std::string NSClientListener::parseRequest(std::string buffer) { 114 124 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 +")."); 118 127 return "ERROR: Invalid password."; 119 } if (pwd.second.empty()) 128 } 129 if (pwd.second.empty()) 120 130 return "ERRRO: No command specified."; 121 131 strEx::token cmd = strEx::getToken(pwd.second, '&'); -
modules/NSClientListener/NSClientListener.h
re26cfe0 r2603350 30 30 31 31 std::string parseRequest(std::string buffer); 32 bool isPasswordOk(std::string remotePassword); 32 33 33 34 // simpleSocket::ListenerHandler implementation -
modules/NSClientListener/NSClientListener.vcproj
r9ce8b01 r2603350 123 123 Name="VCCLCompilerTool" 124 124 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" 126 206 RuntimeLibrary="2" 127 207 UsePrecompiledHeader="2" … … 142 222 Name="VCLinkerTool" 143 223 AdditionalDependencies="ws2_32.lib" 144 OutputFile="../../ Release/modules/$(ProjectName).dll"224 OutputFile="../../Dist/modules/$(ProjectName).dll" 145 225 LinkIncremental="1" 146 226 ModuleDefinitionFile="NSClientListener.def" … … 178 258 </Configuration> 179 259 <Configuration 180 Name=" Distribution|Win32"260 Name="Nightly|Win32" 181 261 OutputDirectory="$(ConfigurationName)" 182 262 IntermediateDirectory="$(ConfigurationName)" … … 204 284 AdditionalIncludeDirectories="../include;../../include" 205 285 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 206 RuntimeLibrary=" 2"286 RuntimeLibrary="0" 207 287 UsePrecompiledHeader="2" 208 288 WarningLevel="3" … … 313 393 /> 314 394 </FileConfiguration> 395 <FileConfiguration 396 Name="Nightly|Win32" 397 > 398 <Tool 399 Name="VCCLCompilerTool" 400 UsePrecompiledHeader="1" 401 /> 402 </FileConfiguration> 315 403 </File> 316 404 </Filter> -
modules/RemoteConfiguration/RemoteConfiguration.vcproj
r1a22e52 r2603350 100 100 </Configuration> 101 101 <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 <Tool110 Name="VCPreBuildEventTool"111 />112 <Tool113 Name="VCCustomBuildTool"114 />115 <Tool116 Name="VCXMLDataGeneratorTool"117 />118 <Tool119 Name="VCWebServiceProxyGeneratorTool"120 />121 <Tool122 Name="VCMIDLTool"123 />124 <Tool125 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 <Tool135 Name="VCManagedResourceCompilerTool"136 />137 <Tool138 Name="VCResourceCompilerTool"139 />140 <Tool141 Name="VCPreLinkEventTool"142 />143 <Tool144 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 <Tool156 Name="VCALinkTool"157 />158 <Tool159 Name="VCManifestTool"160 />161 <Tool162 Name="VCXDCMakeTool"163 />164 <Tool165 Name="VCBscMakeTool"166 />167 <Tool168 Name="VCFxCopTool"169 />170 <Tool171 Name="VCAppVerifierTool"172 />173 <Tool174 Name="VCWebDeploymentTool"175 />176 <Tool177 Name="VCPostBuildEventTool"178 />179 </Configuration>180 <Configuration181 Name="Distribution|Win32"182 OutputDirectory="$(ConfigurationName)"183 IntermediateDirectory="$(ConfigurationName)"184 ConfigurationType="2"185 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"186 CharacterSet="2"187 >188 <Tool189 Name="VCPreBuildEventTool"190 />191 <Tool192 Name="VCCustomBuildTool"193 />194 <Tool195 Name="VCXMLDataGeneratorTool"196 />197 <Tool198 Name="VCWebServiceProxyGeneratorTool"199 />200 <Tool201 Name="VCMIDLTool"202 />203 <Tool204 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 <Tool214 Name="VCManagedResourceCompilerTool"215 />216 <Tool217 Name="VCResourceCompilerTool"218 />219 <Tool220 Name="VCPreLinkEventTool"221 />222 <Tool223 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 <Tool235 Name="VCALinkTool"236 />237 <Tool238 Name="VCManifestTool"239 />240 <Tool241 Name="VCXDCMakeTool"242 />243 <Tool244 Name="VCBscMakeTool"245 />246 <Tool247 Name="VCFxCopTool"248 />249 <Tool250 Name="VCAppVerifierTool"251 />252 <Tool253 Name="VCWebDeploymentTool"254 />255 <Tool256 Name="VCPostBuildEventTool"257 />258 </Configuration>259 <Configuration260 102 Name="Debug|x64" 261 103 OutputDirectory="$(PlatformName)\$(ConfigurationName)" … … 340 182 </Configuration> 341 183 <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 342 263 Name="Release|x64" 343 264 OutputDirectory="$(PlatformName)\$(ConfigurationName)" … … 420 341 </Configuration> 421 342 <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 422 422 Name="Distribution|x64" 423 423 OutputDirectory="$(PlatformName)\$(ConfigurationName)" … … 499 499 /> 500 500 </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> 501 660 </Configurations> 502 661 <References> … … 536 695 </FileConfiguration> 537 696 <FileConfiguration 697 Name="Debug|x64" 698 > 699 <Tool 700 Name="VCCLCompilerTool" 701 UsePrecompiledHeader="1" 702 /> 703 </FileConfiguration> 704 <FileConfiguration 538 705 Name="Release|Win32" 539 706 > … … 544 711 </FileConfiguration> 545 712 <FileConfiguration 713 Name="Release|x64" 714 > 715 <Tool 716 Name="VCCLCompilerTool" 717 UsePrecompiledHeader="1" 718 /> 719 </FileConfiguration> 720 <FileConfiguration 546 721 Name="Distribution|Win32" 547 722 > … … 552 727 </FileConfiguration> 553 728 <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 554 765 Name="Debug|x64" 555 766 > 556 767 <Tool 557 768 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" 559 778 /> 560 779 </FileConfiguration> … … 564 783 <Tool 565 784 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" 567 794 /> 568 795 </FileConfiguration> … … 572 799 <Tool 573 800 Name="VCCLCompilerTool" 574 UsePrecompiledHeader="1"575 />576 </FileConfiguration>577 </File>578 <File579 RelativePath="..\..\include\utils.cpp"580 >581 <FileConfiguration582 Name="Debug|Win32"583 >584 <Tool585 Name="VCCLCompilerTool"586 801 UsePrecompiledHeader="0" 587 802 /> 588 803 </FileConfiguration> 589 804 <FileConfiguration 590 Name=" Release|Win32"805 Name="Nightly|Win32" 591 806 > 592 807 <Tool … … 596 811 </FileConfiguration> 597 812 <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" 623 814 > 624 815 <Tool -
modules/SysTray/SysTray.vcproj
r9ce8b01 r2603350 41 41 Name="VCCLCompilerTool" 42 42 AdditionalIncludeDirectories="../include;../../include" 43 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS "44 RuntimeLibrary=" 2"43 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; _CRT_SECURE_NO_DEPRECATE" 44 RuntimeLibrary="0" 45 45 UsePrecompiledHeader="2" 46 46 WarningLevel="3" … … 62 62 LinkIncremental="1" 63 63 ModuleDefinitionFile="SysTray.def" 64 GenerateDebugInformation=" true"64 GenerateDebugInformation="false" 65 65 SubSystem="2" 66 66 OptimizeReferences="2" … … 200 200 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 201 201 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" 202 281 UsePrecompiledHeader="2" 203 282 WarningLevel="3" … … 299 378 /> 300 379 </FileConfiguration> 380 <FileConfiguration 381 Name="Nightly|Win32" 382 > 383 <Tool 384 Name="VCCLCompilerTool" 385 UsePrecompiledHeader="1" 386 /> 387 </FileConfiguration> 301 388 </File> 302 389 <File
Note: See TracChangeset
for help on using the changeset viewer.








