Changeset 278
- Timestamp:
- 08/10/10 21:54:31 (18 months ago)
- Location:
- trunk
- Files:
-
- 18 added
- 11 deleted
- 16 edited
-
include/checkHelpers.hpp (modified) (6 diffs)
-
include/nrpe/client (added)
-
include/nrpe/client/socket.hpp (added)
-
include/nrpe/nrpe_packet.cpp (deleted)
-
include/nrpe/nrpe_packet.hpp (deleted)
-
include/nrpe/nrpe_socket.cpp (deleted)
-
include/nrpe/nrpe_socket.hpp (deleted)
-
include/nrpe/packet.cpp (added)
-
include/nrpe/packet.hpp (added)
-
include/nrpe/server (added)
-
include/nrpe/server/connection.cpp (added)
-
include/nrpe/server/connection.hpp (added)
-
include/nrpe/server/handler.hpp (added)
-
include/nrpe/server/parser.hpp (added)
-
include/nrpe/server/server.cpp (added)
-
include/nrpe/server/server.hpp (added)
-
include/nrpe/server/ssl_connection.cpp (added)
-
include/nrpe/server/ssl_connection.hpp (added)
-
include/nrpe/server/tcp_connection.cpp (added)
-
include/nrpe/server/tcp_connection.hpp (added)
-
include/settings/macros.h (modified) (1 diff)
-
modules/CheckSystem/CMakeLists.txt (added)
-
modules/CheckSystem/CheckSystem.cpp (modified) (28 diffs)
-
modules/CheckSystem/CheckSystem.def (modified) (1 diff)
-
modules/CheckSystem/CheckSystem.h (modified) (3 diffs)
-
modules/CheckSystem/PDHCollector.cpp (modified) (2 diffs)
-
modules/CheckSystem/stdafx.h (modified) (1 diff)
-
modules/NRPEClient/CMakeLists.txt (modified) (2 diffs)
-
modules/NRPEClient/NRPEClient.cpp (modified) (7 diffs)
-
modules/NRPEClient/NRPEClient.h (modified) (1 diff)
-
modules/NRPEServer/CMakeLists.txt (modified) (2 diffs)
-
modules/NRPEServer/NRPEServer.cpp (modified) (5 diffs)
-
modules/NRPEServer/NRPEServer.h (modified) (2 diffs)
-
modules/NRPEServer/handler_impl.cpp (added)
-
modules/NRPEServer/handler_impl.hpp (added)
-
modules/NRPEServer/nrpe_connection.cpp (deleted)
-
modules/NRPEServer/nrpe_connection.hpp (deleted)
-
modules/NRPEServer/nrpe_handler.cpp (deleted)
-
modules/NRPEServer/nrpe_handler.hpp (deleted)
-
modules/NRPEServer/nrpe_parser.hpp (deleted)
-
modules/NRPEServer/nrpe_server.cpp (deleted)
-
modules/NRPEServer/nrpe_server.hpp (deleted)
-
modules/NRPEServer/stdafx.h (modified) (1 diff)
-
service/NSClient++.cpp (modified) (2 diffs)
-
service/commands.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/checkHelpers.hpp
r273 r278 137 137 else if (warn.hasBounds()) 138 138 return warn.gatherPerfData(getAlias(), value, warn, crit); 139 else 140 return getAlias() + _T(": ERROR"); 139 return _T(""); 141 140 } 142 141 bool hasBounds() { … … 147 146 if (crit.check(value, getAlias(), tstr, critical)) { 148 147 //std::wcout << _T("crit") << std::endl; 149 NSCHelper::escalteReturnCodeToCRIT(returnCode);148 nscapi::plugin_helper::escalteReturnCodeToCRIT(returnCode); 150 149 } else if (warn.check(value, getAlias(), tstr, warning)) { 151 150 //std::wcout << _T("warn") << std::endl; 152 NSCHelper::escalteReturnCodeToWARN(returnCode);151 nscapi::plugin_helper::escalteReturnCodeToWARN(returnCode); 153 152 }else if (show == showLong) { 154 153 //std::wcout << _T("long") << std::endl; … … 309 308 void runCheck(value_type &value, NSCAPI::nagiosReturn &returnCode, std::wstring &message, std::wstring &perf) { 310 309 for (check_list_type::const_iterator cit=checks_.begin(); cit != checks_.end(); ++cit) { 311 (*cit)->set_showall(show);310 //(*cit)->set_showall(show); 312 311 (*cit)->runCheck(value, returnCode, message, perf); 313 312 } … … 728 727 warn_v = warn; 729 728 crit_v = crit; 730 } else if (type_ == value_upper) {731 MAKE_PERFDATA(alias, THandler::print_perf((value.value), unit), unit,732 THandler::print_perf(value.total-warn, unit), THandler::print_perf(value.total-crit, unit));733 729 } else { 734 730 value_p = value.getLowerPercentage(); … … 741 737 return 742 738 MAKE_PERFDATA(alias + _T(" %"), THandler::print_unformated(value_p), _T("%"), THandler::print_unformated(warn_p), THandler::print_unformated(crit_p)) 743 + 739 + _T(" ") + 744 740 MAKE_PERFDATA_EX(alias, THandler::print_perf(value.value, unit), unit, THandler::print_perf(warn_v, unit), THandler::print_perf(crit_v, unit), 745 THandler::print_perf(0, unit), THandler::print_perf(value.total, unit))741 THandler::print_perf(0, unit), THandler::print_perf(value.total, unit)) 746 742 ; 747 743 } … … 1115 1111 typedef ExactBounds<NumericBounds<unsigned int, int_handler> > ExactBoundsUInteger; 1116 1112 typedef ExactBounds<NumericBounds<unsigned long, int_handler> > ExactBoundsULong; 1113 typedef ExactBounds<NumericBounds<long long, int_handler> > ExactBoundsLongLong; 1117 1114 typedef ExactBounds<NumericBounds<time_type, time_handler<__int64> > > ExactBoundsTime; 1118 1115 -
trunk/include/settings/macros.h
r275 r278 319 319 DESCRIBE_SETTING_ADVANCED(SVC_DISABLED, "SERVICE_BOOT_START SERVICE CHECK", "Set how to handle services set to SERVICE_BOOT_START state when checking all services"); 320 320 321 DEFINE_SETTING_S(PDH_SUBSYSTEM, CHECK_SYSTEM_SECTION, "pdh_subsystem", "fast"); 322 DESCRIBE_SETTING_ADVANCED(PDH_SUBSYSTEM, "PDH_SUBSYSTEM", "TODO"); 323 const std::wstring PDH_SUBSYSTEM_FAST = _T("fast"); 324 const std::wstring PDH_SUBSYSTEM_THREAD_SAFE = _T("thread-safe"); 321 325 322 326 } -
trunk/modules/CheckSystem/CheckSystem.cpp
r273 r278 40 40 41 41 /** 42 * DLL Entry point43 * @param hModule44 * @param ul_reason_for_call45 * @param lpReserved46 * @return47 */48 BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)49 {50 NSCModuleWrapper::wrapDllMain(hModule, ul_reason_for_call);51 return TRUE;52 }53 54 /**55 42 * Default c-tor 56 43 * @return … … 73 60 } 74 61 try { 75 NSCModuleHelper::registerCommand(_T("checkCPU"), _T("Check the CPU load of the computer.")); 76 NSCModuleHelper::registerCommand(_T("checkUpTime"), _T("Check the up-time of the computer.")); 77 NSCModuleHelper::registerCommand(_T("checkServiceState"), _T("Check the state of one or more of the computer services.")); 78 NSCModuleHelper::registerCommand(_T("checkProcState"), _T("Check the state of one or more of the processes running on the computer.")); 79 NSCModuleHelper::registerCommand(_T("checkMem"), _T("Check free/used memory on the system.")); 80 NSCModuleHelper::registerCommand(_T("checkCounter"), _T("Check a PDH counter.")); 81 NSCModuleHelper::registerCommand(_T("listCounterInstances"), _T("List all instances for a counter.")); 82 NSCModuleHelper::registerCommand(_T("checkSingleRegEntry"), _T("Check registry key")); 83 84 85 } catch (NSCModuleHelper::NSCMHExcpetion &e) { 62 GET_CORE()->registerCommand(_T("checkCPU"), _T("Check the CPU load of the computer.")); 63 GET_CORE()->registerCommand(_T("checkUpTime"), _T("Check the up-time of the computer.")); 64 GET_CORE()->registerCommand(_T("checkServiceState"), _T("Check the state of one or more of the computer services.")); 65 GET_CORE()->registerCommand(_T("checkProcState"), _T("Check the state of one or more of the processes running on the computer.")); 66 GET_CORE()->registerCommand(_T("checkMem"), _T("Check free/used memory on the system.")); 67 GET_CORE()->registerCommand(_T("checkCounter"), _T("Check a PDH counter.")); 68 GET_CORE()->registerCommand(_T("listCounterInstances"), _T("List all instances for a counter.")); 69 GET_CORE()->registerCommand(_T("checkSingleRegEntry"), _T("Check registry key")); 70 } catch (nscapi::nscapi_exception &e) { 86 71 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 87 72 } catch (...) { … … 333 318 * @return 334 319 */ 335 NSCAPI::nagiosReturn CheckSystem::handleCommand(const strEx::blindstr command, const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf) { 336 std::list<std::wstring> stl_args; 320 NSCAPI::nagiosReturn CheckSystem::handleCommand(const std::wstring command, std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) { 337 321 CheckSystem::returnBundle rb; 338 if (command == _T("check CPU")) {339 return checkCPU(arg Len, char_args, msg, perf);340 } else if (command == _T("check UpTime")) {341 return checkUpTime(arg Len, char_args, msg, perf);342 } else if (command == _T("check ServiceState")) {343 return checkServiceState(arg Len, char_args, msg, perf);344 } else if (command == _T("check ProcState")) {345 return checkProcState(arg Len, char_args, msg, perf);346 } else if (command == _T("check Mem")) {347 return checkMem(arg Len, char_args, msg, perf);348 } else if (command == _T("check Counter")) {349 return checkCounter(arg Len, char_args, msg, perf);350 } else if (command == _T("list CounterInstances")) {351 return listCounterInstances(arg Len, char_args, msg, perf);352 } else if (command == _T("check SingleRegEntry")) {353 return checkSingleRegEntry(arg Len, char_args, msg, perf);322 if (command == _T("checkcpu")) { 323 return checkCPU(arguments, msg, perf); 324 } else if (command == _T("checkuptime")) { 325 return checkUpTime(arguments, msg, perf); 326 } else if (command == _T("checkservicestate")) { 327 return checkServiceState(arguments, msg, perf); 328 } else if (command == _T("checkprocstate")) { 329 return checkProcState(arguments, msg, perf); 330 } else if (command == _T("checkmem")) { 331 return checkMem(arguments, msg, perf); 332 } else if (command == _T("checkcounter")) { 333 return checkCounter(arguments, msg, perf); 334 } else if (command == _T("listcounterinstances")) { 335 return listCounterInstances(arguments, msg, perf); 336 } else if (command == _T("checksingleregentry")) { 337 return checkSingleRegEntry(arguments, msg, perf); 354 338 } 355 339 return NSCAPI::returnIgnored; … … 388 372 } 389 373 }; 390 NSCAPI::nagiosReturn CheckSystem::checkCPU(const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf) 391 { 374 NSCAPI::nagiosReturn CheckSystem::checkCPU(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) { 392 375 typedef checkHolders::CheckContainer<checkHolders::MaxMinBounds<checkHolders::NumericBounds<int, cpuload_handler> > > CPULoadContainer; 393 376 394 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 395 if (stl_args.empty()) { 377 if (arguments.empty()) { 396 378 msg = _T("ERROR: Missing argument exception."); 397 379 return NSCAPI::returnUNKNOWN; … … 405 387 tmpObject.data = _T("cpuload"); 406 388 407 MAP_OPTIONS_BEGIN( stl_args)389 MAP_OPTIONS_BEGIN(arguments) 408 390 MAP_OPTIONS_NUMERIC_ALL(tmpObject, _T("")) 409 391 MAP_OPTIONS_STR(_T("warn"), tmpObject.warn.max) … … 450 432 msg = _T("OK CPU Load ok."); 451 433 else if (!bNSClient) 452 msg = NSCHelper::translateReturn(returnCode) + _T(": ") + msg;434 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": ") + msg; 453 435 return returnCode; 454 436 } 455 437 456 NSCAPI::nagiosReturn CheckSystem::checkUpTime( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf)438 NSCAPI::nagiosReturn CheckSystem::checkUpTime(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) 457 439 { 458 440 typedef checkHolders::CheckContainer<checkHolders::MaxMinBoundsTime> UpTimeContainer; 459 441 460 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 461 if (stl_args.empty()) { 442 if (arguments.empty()) { 462 443 msg = _T("ERROR: Missing argument exception."); 463 444 return NSCAPI::returnUNKNOWN; … … 470 451 bounds.data = _T("uptime"); 471 452 472 MAP_OPTIONS_BEGIN( stl_args)453 MAP_OPTIONS_BEGIN(arguments) 473 454 MAP_OPTIONS_NUMERIC_ALL(bounds, _T("")) 474 455 MAP_OPTIONS_STR(_T("warn"), bounds.warn.min) … … 503 484 msg = _T("OK all counters within bounds."); 504 485 else if (!bNSClient) 505 msg = NSCHelper::translateReturn(returnCode) + _T(": ") + msg;486 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": ") + msg; 506 487 return returnCode; 507 488 } … … 542 523 * @return The status of the command 543 524 */ 544 NSCAPI::nagiosReturn CheckSystem::checkServiceState( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf)525 NSCAPI::nagiosReturn CheckSystem::checkServiceState(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) 545 526 { 546 527 typedef checkHolders::CheckContainer<checkHolders::SimpleBoundsStateBoundsInteger> StateContainer; 547 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 548 if (stl_args.empty()) { 528 if (arguments.empty()) { 549 529 msg = _T("ERROR: Missing argument exception."); 550 530 return NSCAPI::returnUNKNOWN; … … 562 542 tmpObject.crit.state = _T("started"); 563 543 //{{ 564 MAP_OPTIONS_BEGIN( stl_args)544 MAP_OPTIONS_BEGIN(arguments) 565 545 MAP_OPTIONS_SHOWALL(tmpObject) 566 546 MAP_OPTIONS_STR(_T("Alias"), tmpObject.data) … … 619 599 if (!msg.empty()) msg += _T(" - "); 620 600 msg += (*it).data + _T(": Error"); 621 NSCHelper::escalteReturnCodeToWARN(returnCode);601 nscapi::plugin_helper::escalteReturnCodeToWARN(returnCode); 622 602 continue; 623 603 } … … 639 619 } 640 620 if (!ok) 641 NSCHelper::escalteReturnCodeToCRIT(returnCode);621 nscapi::plugin_helper::escalteReturnCodeToCRIT(returnCode); 642 622 } 643 623 } … … 673 653 msg = _T("OK: All services are in their appropriate state."); 674 654 else if (msg.empty()) 675 msg = NSCHelper::translateReturn(returnCode) + _T(": Whooha this is odd.");655 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": Whooha this is odd."); 676 656 else if (!bNSClient) 677 msg = NSCHelper::translateReturn(returnCode) + _T(": ") + msg;657 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": ") + msg; 678 658 return returnCode; 679 659 } … … 690 670 * @return The status of the command 691 671 */ 692 NSCAPI::nagiosReturn CheckSystem::checkMem( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf)672 NSCAPI::nagiosReturn CheckSystem::checkMem(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) 693 673 { 694 674 typedef checkHolders::CheckContainer<checkHolders::MaxMinBounds<checkHolders::NumericPercentageBounds<checkHolders::PercentageValueType<unsigned __int64, unsigned __int64>, checkHolders::disk_size_handler<unsigned __int64> > > > MemoryContainer; 695 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 696 if (stl_args.empty()) { 675 if (arguments.empty()) { 697 676 msg = _T("ERROR: Missing argument exception."); 698 677 return NSCAPI::returnUNKNOWN; … … 705 684 MemoryContainer tmpObject; 706 685 707 MAP_OPTIONS_BEGIN( stl_args)686 MAP_OPTIONS_BEGIN(arguments) 708 687 MAP_OPTIONS_SHOWALL(tmpObject) 709 688 MAP_OPTIONS_STR_AND(_T("type"), tmpObject.data, list.push_back(tmpObject)) … … 796 775 msg = _T("OK memory within bounds."); 797 776 else 798 msg = NSCHelper::translateReturn(returnCode) + _T(": ") + msg;777 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": ") + msg; 799 778 return returnCode; 800 779 } … … 807 786 NSPROCDATA__(const NSPROCDATA__ &other) : count(other.count), entry(other.entry), key(other.key) {} 808 787 } NSPROCDATA; 809 typedef std::map<std::wstring,NSPROCDATA,strEx:: case_blind_string_compare> NSPROCLST;788 typedef std::map<std::wstring,NSPROCDATA,strEx::StrICmp> NSPROCLST; 810 789 811 790 class NSC_error : public CEnumProcess::error_reporter { … … 870 849 * @return The status of the command 871 850 */ 872 NSCAPI::nagiosReturn CheckSystem::checkProcState( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf)851 NSCAPI::nagiosReturn CheckSystem::checkProcState(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) 873 852 { 874 853 typedef checkHolders::CheckContainer<checkHolders::MaxMinStateBoundsStateBoundsInteger> StateContainer; 875 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 876 if (stl_args.empty()) { 854 if (arguments.empty()) { 877 855 msg = _T("ERROR: Missing argument exception."); 878 856 return NSCAPI::returnUNKNOWN; … … 895 873 tmpObject.crit.state = _T("started"); 896 874 897 MAP_OPTIONS_BEGIN( stl_args)875 MAP_OPTIONS_BEGIN(arguments) 898 876 MAP_OPTIONS_NUMERIC_ALL(tmpObject, _T("Count")) 899 877 MAP_OPTIONS_STR(_T("Alias"), tmpObject.alias) … … 984 962 if (!msg.empty()) msg += _T(" - "); 985 963 msg += (*it).data + _T(": not running"); 986 NSCHelper::escalteReturnCodeToCRIT(returnCode);964 nscapi::plugin_helper::escalteReturnCodeToCRIT(returnCode); 987 965 } 988 966 } else { … … 1006 984 msg = _T("OK: All processes are running."); 1007 985 else if (!bNSClient) 1008 msg = NSCHelper::translateReturn(returnCode) + _T(": ") + msg;986 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": ") + msg; 1009 987 return returnCode; 1010 988 } … … 1023 1001 * @todo add parsing support for NRPE 1024 1002 */ 1025 NSCAPI::nagiosReturn CheckSystem::checkCounter( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf)1003 NSCAPI::nagiosReturn CheckSystem::checkCounter(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) 1026 1004 { 1027 1005 typedef checkHolders::CheckContainer<checkHolders::MaxMinBoundsDouble> CounterContainer; 1028 1006 1029 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 1030 if (stl_args.empty()) { 1007 if (arguments.empty()) { 1031 1008 msg = _T("ERROR: Missing argument exception."); 1032 1009 return NSCAPI::returnUNKNOWN; … … 1044 1021 bool bForceReload = false; 1045 1022 1046 MAP_OPTIONS_BEGIN( stl_args)1023 MAP_OPTIONS_BEGIN(arguments) 1047 1024 MAP_OPTIONS_STR(_T("InvalidStatus"), invalidStatus) 1048 1025 MAP_OPTIONS_STR_AND(_T("Counter"), tmpObject.data, counters.push_back(tmpObject)) … … 1129 1106 msg = _T("0"); 1130 1107 }else if (!bNSClient) 1131 msg = NSCHelper::translateReturn(returnCode) + _T(": ") + msg;1108 msg = nscapi::plugin_helper::translateReturn(returnCode) + _T(": ") + msg; 1132 1109 return returnCode; 1133 1110 } … … 1147 1124 * @todo add parsing support for NRPE 1148 1125 */ 1149 NSCAPI::nagiosReturn CheckSystem::listCounterInstances( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf)1126 NSCAPI::nagiosReturn CheckSystem::listCounterInstances(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf) 1150 1127 { 1151 1128 typedef checkHolders::CheckContainer<checkHolders::MaxMinBoundsDouble> CounterContainer; 1152 1129 1153 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args); 1154 if (stl_args.empty()) { 1130 if (arguments.empty()) { 1155 1131 msg = _T("ERROR: Missing argument exception."); 1156 1132 return NSCAPI::returnUNKNOWN; 1157 1133 } 1158 1134 1159 std::wstring counter = arrayBuffer::arrayBuffer2string(char_args, argLen, _T(" ")); 1135 std::wstring counter; 1136 BOOST_FOREACH(std::wstring s, arguments) { counter+= s + _T(" "); } 1160 1137 try { 1161 1138 PDH::Enumerations::pdh_object_details obj = PDH::Enumerations::EnumObjectInstances(counter); … … 1462 1439 1463 1440 1464 NSCAPI::nagiosReturn CheckSystem::checkSingleRegEntry( const unsigned int argLen, TCHAR **char_args, std::wstring &message, std::wstring &perf) {1441 NSCAPI::nagiosReturn CheckSystem::checkSingleRegEntry(std::list<std::wstring> arguments, std::wstring &message, std::wstring &perf) { 1465 1442 NSCAPI::nagiosReturn returnCode = NSCAPI::returnOK; 1466 std::list<std::wstring> stl_args = arrayBuffer::arrayBuffer2list(argLen, char_args);1467 1443 check_file_multi checker; 1468 1444 typedef std::pair<int,regkey_filter> filteritem_type; 1469 1445 typedef std::list<filteritem_type > filterlist_type; 1470 if ( stl_args.empty()) {1446 if (arguments.empty()) { 1471 1447 message = _T("Missing argument(s)."); 1472 1448 return NSCAPI::returnUNKNOWN; … … 1479 1455 1480 1456 try { 1481 MAP_OPTIONS_BEGIN( stl_args)1457 MAP_OPTIONS_BEGIN(arguments) 1482 1458 MAP_OPTIONS_STR2INT(_T("truncate"), truncate) 1483 1459 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) … … 1522 1498 } 1523 1499 1500 NSC_WRAP_DLL(); 1524 1501 NSC_WRAPPERS_MAIN_DEF(gCheckSystem); 1525 1502 NSC_WRAPPERS_IGNORE_MSG_DEF(); 1526 1503 NSC_WRAPPERS_HANDLE_CMD_DEF(gCheckSystem); 1527 NSC_WRAPPERS_HANDLE_CONFIGURATION(gCheckSystem); 1528 NSC_WRAPPERS_CLI_DEF(gCheckSystem); 1529 1530 1531 1532 MODULE_SETTINGS_START(CheckSystem, _T("System check module"), _T("...")) 1533 1534 PAGE(_T("Check options")) 1535 1536 ITEM_EDIT_TEXT(_T("Check resolution"), _T("This is how often the PDH data is polled and stored in the CPU buffer. (this is enterd in 1/th: of a second)")) 1537 OPTION(_T("unit"), _T("1/10:th of a second")) 1538 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1539 OPTION(_T("section"), _T("Check System")) 1540 OPTION(_T("key"), _T("CheckResolution")) 1541 OPTION(_T("default"), _T("10")) 1542 ITEM_END() 1543 1544 ITEM_EDIT_TEXT(_T("CPU buffer size"), _T("This is the size of the buffer that stores CPU history.")) 1545 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1546 OPTION(_T("section"), _T("Check System")) 1547 OPTION(_T("key"), _T("CPUBufferSize")) 1548 OPTION(_T("default"), _T("1h")) 1549 ITEM_END() 1550 1551 PAGE_END() 1552 ADVANCED_PAGE(_T("Compatiblity settings")) 1553 1554 ITEM_EDIT_TEXT(_T("MemoryCommitByte"), _T("The memory commited bytes used to calculate the avalible memory.")) 1555 OPTION(_T("disableCaption"), _T("Attempt to autodetect this.")) 1556 OPTION(_T("disabled"), _T("auto")) 1557 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1558 OPTION(_T("section"), _T("Check System")) 1559 OPTION(_T("key"), _T("MemoryCommitByte")) 1560 OPTION(_T("default"), _T("auto")) 1561 ITEM_END() 1562 1563 ITEM_EDIT_TEXT(_T("MemoryCommitLimit"), _T("The memory commit limit used to calculate the avalible memory.")) 1564 OPTION(_T("disableCaption"), _T("Attempt to autodetect this.")) 1565 OPTION(_T("disabled"), _T("auto")) 1566 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1567 OPTION(_T("section"), _T("Check System")) 1568 OPTION(_T("key"), _T("MemoryCommitLimit")) 1569 OPTION(_T("default"), _T("auto")) 1570 ITEM_END() 1571 1572 ITEM_EDIT_TEXT(_T("SystemSystemUpTime"), _T("The PDH counter for the System uptime.")) 1573 OPTION(_T("disableCaption"), _T("Attempt to autodetect this.")) 1574 OPTION(_T("disabled"), _T("auto")) 1575 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1576 OPTION(_T("section"), _T("Check System")) 1577 OPTION(_T("key"), _T("SystemSystemUpTime")) 1578 OPTION(_T("default"), _T("auto")) 1579 ITEM_END() 1580 1581 ITEM_EDIT_TEXT(_T("SystemTotalProcessorTime"), _T("The PDH conter usaed to measure CPU load.")) 1582 OPTION(_T("disableCaption"), _T("Attempt to autodetect this.")) 1583 OPTION(_T("disabled"), _T("auto")) 1584 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1585 OPTION(_T("section"), _T("Check System")) 1586 OPTION(_T("key"), _T("SystemTotalProcessorTime")) 1587 OPTION(_T("default"), _T("auto")) 1588 ITEM_END() 1589 1590 ITEM_EDIT_TEXT(_T("ProcessEnumerationMethod"), _T("The method to use when enumerating processes")) 1591 OPTION(_T("count"), _T("3")) 1592 OPTION(_T("caption_1"), _T("Autodetect (TOOLHELP for NT/4 and PSAPI for W2k)")) 1593 OPTION(_T("value_1"), _T("auto")) 1594 OPTION(_T("caption_2"), _T("TOOLHELP use this for NT/4 systems")) 1595 OPTION(_T("value_2"), _T("TOOLHELP")) 1596 OPTION(_T("caption_3"), _T("PSAPI use this for W2k (and abowe) systems")) 1597 OPTION(_T("value_3"), _T("PSAPI")) 1598 ITEM_MAP_TO(_T("basic_ini_text_mapper")) 1599 OPTION(_T("section"), _T("Check System")) 1600 OPTION(_T("key"), _T("ProcessEnumerationMethod")) 1601 OPTION(_T("default"), _T("auto")) 1602 ITEM_END() 1603 1604 PAGE_END() 1605 MODULE_SETTINGS_END() 1504 //NSC_WRAPPERS_CLI_DEF(gCheckSystem); 1505 -
trunk/modules/CheckSystem/CheckSystem.def
r257 r278 12 12 NSUnloadModule 13 13 NSGetModuleDescription 14 NS CommandLineExec14 NSDeleteBuffer -
trunk/modules/CheckSystem/CheckSystem.h
r273 r278 28 28 NSC_WRAPPERS_CLI(); 29 29 30 class CheckSystem {30 class CheckSystem : public nscapi::impl::SimpleCommand { 31 31 private: 32 32 CheckMemory memoryChecker; … … 62 62 * @return module version 63 63 */ 64 NSCModuleWrapper::module_version getModuleVersion() {65 NSCModuleWrapper::module_version version = {0, 3, 0 };64 nscapi::plugin_wrapper::module_version getModuleVersion() { 65 nscapi::plugin_wrapper::module_version version = {0, 3, 0 }; 66 66 return version; 67 67 } … … 72 72 bool hasCommandHandler(); 73 73 bool hasMessageHandler(); 74 NSCAPI::nagiosReturn handleCommand(const st rEx::blindstr command, const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);74 NSCAPI::nagiosReturn handleCommand(const std::wstring command, std::list<std::wstring> arguments, std::wstring &message, std::wstring &perf); 75 75 int commandLineExec(const TCHAR* command,const unsigned int argLen,TCHAR** args); 76 76 77 NSCAPI::nagiosReturn checkCPU( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);78 NSCAPI::nagiosReturn checkUpTime( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);79 NSCAPI::nagiosReturn checkServiceState( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);80 NSCAPI::nagiosReturn checkMem( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);81 NSCAPI::nagiosReturn checkProcState( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);82 NSCAPI::nagiosReturn checkCounter( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);83 NSCAPI::nagiosReturn listCounterInstances( const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf);84 NSCAPI::nagiosReturn checkSingleRegEntry( const unsigned int argLen, TCHAR **char_args, std::wstring &message, std::wstring &perf);77 NSCAPI::nagiosReturn checkCPU(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 78 NSCAPI::nagiosReturn checkUpTime(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 79 NSCAPI::nagiosReturn checkServiceState(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 80 NSCAPI::nagiosReturn checkMem(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 81 NSCAPI::nagiosReturn checkProcState(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 82 NSCAPI::nagiosReturn checkCounter(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 83 NSCAPI::nagiosReturn listCounterInstances(std::list<std::wstring> arguments, std::wstring &msg, std::wstring &perf); 84 NSCAPI::nagiosReturn checkSingleRegEntry(std::list<std::wstring> arguments, std::wstring &message, std::wstring &perf); 85 85 86 86 -
trunk/modules/CheckSystem/PDHCollector.cpp
r250 r278 30 30 unsigned int i = strEx::stoui_as_time(s, checkIntervall_*100); 31 31 cpu.resize(i/(checkIntervall_*100)+10); 32 std::wstring subsystem = NSCModuleHelper::getSettingsString(C_SYSTEM_SECTION_TITLE, C_SYSTEM_PDH_SUBSYSTEM, C_SYSTEM_PDH_SUBSYSTEM_DEFAULT);33 if (subsystem == C_SYSTEM_PDH_SUBSYSTEM_DEFAULT) {34 } else if (subsystem == _T("thread-safe")) {32 std::wstring subsystem = SETTINGS_GET_STRING(check_system::PDH_SUBSYSTEM); 33 if (subsystem == setting_keys::check_system::PDH_SUBSYSTEM_FAST) { 34 } else if (subsystem == setting_keys::check_system::PDH_SUBSYSTEM_THREAD_SAFE) { 35 35 PDH::PDHFactory::set_threadSafe(); 36 36 } else { … … 115 115 memCb = _T("\\") + PDH::PDHResolver::lookupIndex(4) + _T("\\") + PDH::PDHResolver::lookupIndex(26); 116 116 } else { 117 settings_core settings; 117 NSC_LOG_ERROR_STD(_T("You need to manually configure performance counters!")); 118 /* 119 Settings::SettingsCore settings; 118 120 settings.setFile(NSCModuleHelper::getBasePath(), _T("counters.defs"), true); 119 121 NSC_DEBUG_MSG_STD(_T("Detected language: ") + settings.getString(section, _T("Description"), _T("Not found")) + _T(" (") + section + _T(")")); -
trunk/modules/CheckSystem/stdafx.h
r207 r278 35 35 #include <list> 36 36 #include <NSCAPI.h> 37 #include <nsc _module_wrapper.hpp>38 #include < NSCHelper.h>37 #include <nscapi/plugin.hpp> 38 #include <nscapi/nscapi_plugin_wrapper.hpp> 39 39 #include <config.h> 40 40 #include <utils.h> -
trunk/modules/NRPEClient/CMakeLists.txt
r270 r278 8 8 stdafx.cpp 9 9 "${TARGET}.cpp" 10 ${NSCP_INCLUDEDIR}/nrpe/ nrpe_packet.cpp10 ${NSCP_INCLUDEDIR}/nrpe/packet.cpp 11 11 12 12 ${NSCP_DEF_PLUGIN_CPP} … … 21 21 "${TARGET}.def" 22 22 ${NSCP_INCLUDEDIR}/socket_helpers.hpp 23 ${NSCP_INCLUDEDIR}/nrpe/ nrpe_packet.hpp24 ${NSCP_INCLUDEDIR}/nrpe/ nrpe_socket.hpp23 ${NSCP_INCLUDEDIR}/nrpe/packet.hpp 24 ${NSCP_INCLUDEDIR}/nrpe/client/socket.hpp 25 25 ${NSCP_INCLUDEDIR}/swap_bytes.hpp 26 26 -
trunk/modules/NRPEClient/NRPEClient.cpp
r257 r278 29 29 #include <boost/filesystem.hpp> 30 30 #include <strEx.h> 31 #include <nrpe/ nrpe_socket.hpp>31 #include <nrpe/client/socket.hpp> 32 32 33 33 … … 88 88 89 89 void NRPEClient::addCommand(strEx::blindstr key, std::wstring args) { 90 #ifndef USE_BOOST91 NSC_LOG_ERROR_STD(_T("Could not parse: ") + key.c_str() + _T(" boost not avalible!"));92 #else93 90 try { 94 91 … … 120 117 commands[key] = command_data; 121 118 122 NSCModuleHelper::registerCommand(key.c_str(), command_data.toString());119 GET_CORE()->registerCommand(key.c_str(), command_data.toString()); 123 120 124 121 } catch (boost::program_options::validation_error &e) { … … 127 124 NSC_LOG_ERROR_STD(_T("Could not parse: ") + key.c_str()); 128 125 } 129 #endif130 126 } 131 127 … … 205 201 packet = send_ssl(con.host, con.port, con.timeout, nrpe::packet::make_request(con.get_cli(arguments), con.buffer_length)); 206 202 #else 203 NSC_LOG_ERROR_STD(_T("SSL not avalible (not compiled with USE_SSL)")); 207 204 return nrpe_result_data(NSCAPI::returnUNKNOWN, _T("SSL support not available (compiled without USE_SSL)!")); 208 205 #endif … … 227 224 ctx.use_tmp_dh_file(to_string(cert_)); 228 225 ctx.set_verify_mode(boost::asio::ssl::context::verify_none); 229 nrpe:: ssl_socket socket(io_service, ctx, host, port);226 nrpe::client::ssl_socket socket(io_service, ctx, host, port); 230 227 socket.send(packet, boost::posix_time::seconds(timeout)); 231 228 return socket.recv(packet, boost::posix_time::seconds(timeout)); … … 235 232 nrpe::packet NRPEClient::send_nossl(std::wstring host, int port, int timeout, nrpe::packet packet) { 236 233 boost::asio::io_service io_service; 237 nrpe:: socket socket(io_service, host, port);234 nrpe::client::socket socket(io_service, host, port); 238 235 socket.send(packet, boost::posix_time::seconds(timeout)); 239 236 return socket.recv(packet, boost::posix_time::seconds(timeout)); -
trunk/modules/NRPEClient/NRPEClient.h
r273 r278 22 22 NSC_WRAPPERS_MAIN(); 23 23 #include <map> 24 #include <nrpe/ nrpe_packet.hpp>24 #include <nrpe/packet.hpp> 25 25 26 26 -
trunk/modules/NRPEServer/CMakeLists.txt
r270 r278 11 11 stdafx.cpp 12 12 "${TARGET}.cpp" 13 nrpe_server.cpp 14 nrpe_connection.cpp 15 nrpe_handler.cpp 16 ${NSCP_INCLUDEDIR}/nrpe/nrpe_packet.cpp 13 "handler_impl.cpp" 14 ${NSCP_INCLUDEDIR}/nrpe/server/server.cpp 15 ${NSCP_INCLUDEDIR}/nrpe/server/connection.cpp 16 ${NSCP_INCLUDEDIR}/nrpe/server/tcp_connection.cpp 17 ${NSCP_INCLUDEDIR}/nrpe/server/ssl_connection.cpp 18 ${NSCP_INCLUDEDIR}/nrpe/packet.cpp 17 19 18 20 ${NSCP_DEF_PLUGIN_CPP} … … 26 28 "${TARGET}.h" 27 29 "${TARGET}.def" 28 nrpe_server.hpp 29 nrpe_connection.hpp 30 nrpe_handler.hpp 31 nrpe_parser.hpp 30 "handler_impl.hpp" 31 ${NSCP_INCLUDEDIR}/nrpe/server/server.hpp 32 ${NSCP_INCLUDEDIR}/nrpe/server/connection.hpp 33 ${NSCP_INCLUDEDIR}/nrpe/server/tcp_connection.hpp 34 ${NSCP_INCLUDEDIR}/nrpe/server/ssl_connection.hpp 35 ${NSCP_INCLUDEDIR}/nrpe/server/handler.hpp 36 ${NSCP_INCLUDEDIR}/nrpe/server/parser.hpp 32 37 ${NSCP_INCLUDEDIR}/socket_helpers.hpp 33 ${NSCP_INCLUDEDIR}/nrpe/ nrpe_packet.hpp38 ${NSCP_INCLUDEDIR}/nrpe/packet.hpp 34 39 ${NSCP_INCLUDEDIR}/swap_bytes.hpp 35 40 -
trunk/modules/NRPEServer/NRPEServer.cpp
r271 r278 25 25 #include <config.h> 26 26 #include <msvc_wrappers.h> 27 #include "handler_impl.hpp" 27 28 28 29 NRPEListener gNRPEListener; 29 30 30 NRPEListener::NRPEListener() : noPerfData_(false), buffer_length_(0) {31 NRPEListener::NRPEListener() : noPerfData_(false), info_(boost::shared_ptr<nrpe::server::handler>(new handler_impl(0))) { 31 32 } 32 33 NRPEListener::~NRPEListener() { … … 59 60 SETTINGS_REG_PATH(nrpe::SECTION_HANDLERS); 60 61 61 bUseSSL_= SETTINGS_GET_BOOL(nrpe::KEYUSE_SSL)==1;62 info_.use_ssl = SETTINGS_GET_BOOL(nrpe::KEYUSE_SSL)==1; 62 63 63 64 #ifndef USE_SSL … … 69 70 noPerfData_ = SETTINGS_GET_INT(nrpe::ALLOW_PERFDATA)==0; 70 71 timeout = SETTINGS_GET_INT(nrpe::READ_TIMEOUT); 71 buffer_length_ = SETTINGS_GET_INT(nrpe::PAYLOAD_LENGTH); 72 if (buffer_length_ != 1024) 73 NSC_DEBUG_MSG_STD(_T("Non-standard buffer length (hope you have recompiled check_nrpe changing #define MAX_PACKETBUFFER_LENGTH = ") + strEx::itos(buffer_length_)); 74 NSC_DEBUG_MSG_STD(_T("Loading all commands (from NRPE)")); 72 info_.request_handler->set_payload_length(SETTINGS_GET_INT(nrpe::PAYLOAD_LENGTH)); 73 if (info_.request_handler->get_payload_length() != 1024) 74 NSC_DEBUG_MSG_STD(_T("Non-standard buffer length (hope you have recompiled check_nrpe changing #define MAX_PACKETBUFFER_LENGTH = ") + strEx::itos(info_.request_handler->get_payload_length())); 75 75 76 76 boost::asio::io_service io_service_; … … 78 78 NSC_DEBUG_MSG_STD(_T("Allowed hosts: ") + allowedHosts.to_string()); 79 79 try { 80 NSC_DEBUG_MSG_STD(_T("Starting NRPE socket...")); 81 unsigned short port = SETTINGS_GET_INT(nrpe::PORT); 82 std::wstring host = SETTINGS_GET_STRING(nrpe::BINDADDR); 83 unsigned int backLog = SETTINGS_GET_INT(nrpe::LISTENQUE); 84 unsigned int threadPool = 10; 80 info_.port = to_string(SETTINGS_GET_INT(nrpe::PORT)); 81 info_.address = to_string(SETTINGS_GET_STRING(nrpe::BINDADDR)); 82 unsigned int backLog = SETTINGS_GET_INT(nrpe::LISTENQUE); // @todo: add to info block 83 info_.thread_pool_size = 10; // @todo Add as option 85 84 if (mode == NSCAPI::normalStart) { 86 server_.reset(new nrpe::server::server(to_string(host), to_string(port), (""), threadPool)); 85 if (info_.use_ssl) { 86 #ifdef USE_SSL 87 server_.reset(new nrpe::server::server(info_)); 88 // NSC_LOG_ERROR_STD(_T("SSL not implemented")); 89 // return false; 90 #else 91 NSC_LOG_ERROR_STD(_T("SSL is not supported (not compiled with openssl)")); 92 return false; 93 #endif 94 } else { 95 server_.reset(new nrpe::server::server(info_)); 96 } 97 if (!server_) { 98 NSC_LOG_ERROR_STD(_T("Failed to create server instance!")); 99 return false; 100 } 87 101 server_->start(); 88 #ifdef USE_SSL89 if (bUseSSL_) {90 //socket_ssl_.setHandler(this);91 //socket_ssl_.StartListener(host, port, backLog);92 } else {93 #else94 {95 #endif96 //socket_.setHandler(this);97 //socket_.StartListener(host, port, backLog);98 }99 102 } 103 } catch (nrpe::server::nrpe_exception &e) { 104 NSC_LOG_ERROR_STD(_T("Exception caught: ") + e.what()); 105 return false; 100 106 } catch (...) { 101 107 NSC_LOG_ERROR_STD(_T("Exception caught: <UNKNOWN EXCEPTION>")); 102 108 return false; 103 109 } 104 root_ = GET_CORE()->getBasePath();105 110 return true; 106 111 } … … 111 116 server_->stop(); 112 117 server_.reset(); 113 }114 #ifdef USE_SSL115 if (bUseSSL_) {116 //socket_ssl_.removeHandler(this);117 //if (socket_ssl_.hasListener())118 // socket_ssl_.StopListener();119 } else {120 #else121 {122 #endif123 //socket_.removeHandler(this);124 //if (socket_.hasListener())125 // socket_.StopListener();126 118 } 127 119 } catch (...) { -
trunk/modules/NRPEServer/NRPEServer.h
r277 r278 21 21 22 22 #include <socket_helpers.hpp> 23 #include "nrpe_server.hpp"23 #include <nrpe/server/server.hpp> 24 24 25 25 NSC_WRAPPERS_MAIN(); … … 40 40 socketHelpers::allowedHosts allowedHosts; 41 41 bool noPerfData_; 42 unsigned int buffer_length_; 43 std::wstring root_; 44 bool bUseSSL_; 42 nrpe::server::server::connection_info info_; 45 43 46 44 public: -
trunk/modules/NRPEServer/stdafx.h
r257 r278 47 47 #include <NSCAPI.h> 48 48 #include <nscapi/plugin.hpp> 49 #include <nrpe/ nrpe_packet.hpp>49 #include <nrpe/packet.hpp> 50 50 -
trunk/service/NSClient++.cpp
r257 r278 1092 1092 * @return The command status 1093 1093 */ 1094 NSCAPI::nagiosReturn NSClientT::injectRAW(const wchar_t* command, std::string &request, std::string &response) { 1094 NSCAPI::nagiosReturn NSClientT::injectRAW(const wchar_t* raw_command, std::string &request, std::string &response) { 1095 std::wstring cmd = nsclient::commands::make_key(raw_command); 1095 1096 if (logDebug()) { 1096 LOG_DEBUG_STD(_T("Injecting: ") + std::wstring(command)+ _T(": {{{") + strEx::strip_hex(to_wstring(request)) + _T("}}}"));1097 LOG_DEBUG_STD(_T("Injecting: ") + cmd + _T(": {{{") + strEx::strip_hex(to_wstring(request)) + _T("}}}")); 1097 1098 } 1098 1099 /*if (shared_client_.get() != NULL && shared_client_->hasMaster()) { … … 1118 1119 } 1119 1120 try { 1120 nsclient::commands::plugin_type plugin = commands_.get(c ommand);1121 nsclient::commands::plugin_type plugin = commands_.get(cmd); 1121 1122 if (!plugin) { 1122 LOG_ERROR_CORE(_T("No handler for command: ") + std::wstring(command)+ _T(" avalible commands: ") + commands_.to_wstring());1123 LOG_ERROR_CORE(_T("No handler for command: ") + cmd + _T(" avalible commands: ") + commands_.to_wstring()); 1123 1124 return NSCAPI::returnIgnored; 1124 1125 } 1125 NSCAPI::nagiosReturn c = plugin->handleCommand(c ommand, request, response);1126 LOG_DEBUG_STD(_T("Result ") + std::wstring(command)+ _T(": ") + nscapi::plugin_helper::translateReturn(c) + _T(" {{{") + strEx::strip_hex(to_wstring(response)) + _T("}}}"));1126 NSCAPI::nagiosReturn c = plugin->handleCommand(cmd.c_str(), request, response); 1127 LOG_DEBUG_STD(_T("Result ") + cmd + _T(": ") + nscapi::plugin_helper::translateReturn(c) + _T(" {{{") + strEx::strip_hex(to_wstring(response)) + _T("}}}")); 1127 1128 return c; 1128 1129 } catch (nsclient::commands::command_exception &e) { 1129 LOG_ERROR_CORE(_T("No handler for command: ") + std::wstring(command)+ _T(": ") + to_wstring(e.what()));1130 LOG_ERROR_CORE(_T("No handler for command: ") + cmd + _T(": ") + to_wstring(e.what())); 1130 1131 return NSCAPI::returnIgnored; 1131 1132 } catch (...) { 1132 LOG_ERROR_CORE(_T("Error handling command: ") + std::wstring(command));1133 LOG_ERROR_CORE(_T("Error handling command: ") + cmd); 1133 1134 return NSCAPI::returnIgnored; 1134 1135 } -
trunk/service/commands.hpp
r271 r278 183 183 } 184 184 185 inlinestd::wstring make_key(std::wstring key) {185 static std::wstring make_key(std::wstring key) { 186 186 return boost::algorithm::to_lower_copy(key); 187 187 }
Note: See TracChangeset
for help on using the changeset viewer.







