Changeset c74d7b6 in nscp
- Timestamp:
- 02/21/12 23:29:34 (16 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 84cdb9b
- Parents:
- 72eea1f
- Files:
-
- 7 added
- 12 edited
-
changelog (modified) (1 diff)
-
include/ServiceCmd.cpp (modified) (1 diff)
-
include/net/net.hpp (modified) (1 diff)
-
include/nscapi/settings_object.hpp (modified) (8 diffs)
-
libs/protobuf/plugin.proto (modified) (1 diff)
-
modules/CauseCrashes/CMakeLists.txt (added)
-
modules/CauseCrashes/CauseCrashes.cpp (added)
-
modules/CauseCrashes/CauseCrashes.def (added)
-
modules/CauseCrashes/CauseCrashes.h (added)
-
modules/CauseCrashes/module.cmake (added)
-
modules/CauseCrashes/stdafx.cpp (added)
-
modules/CauseCrashes/stdafx.h (added)
-
modules/CheckNSCP/CheckNSCP.cpp (modified) (2 diffs)
-
modules/NSCAClient/NSCAClient.cpp (modified) (1 diff)
-
service/NSClient++.cpp (modified) (1 diff)
-
service/cli_parser.hpp (modified) (1 diff)
-
service/service_manager.hpp (modified) (2 diffs)
-
version.hpp (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
changelog
r72eea1f rc74d7b6 5 5 * Fix RtlStringFromGUID problem on NT4 6 6 7 2012-02-19 MickeM 7 2012-02-21 MickeM 8 * Added new module CauseCrash which has a single command CrashClient to allow the service to be crashed remotly 9 *WARNING* Dont use this command, it is for debugging and testing purpouses only 10 * Fixed issue with BreakPad which was disabled 11 * Fixed some unix issues (sorry but hudson's stopped emailing me again:( ) 12 * Fixed service --install (now sets correct options) 13 * Fixed service --install (now sets description correctly) 14 * Fixed log level defined in protobuf (now same as rest of the system) 15 * Fixed some issues with the check_nscp command 16 17 2012-02-20 MickeM 8 18 * Fixed NRPE buffer issue 9 19 * Added test case for 65K NRPE buffer length as well as 1Mb -
include/ServiceCmd.cpp
rd66ccee rc74d7b6 394 394 395 395 TCHAR* d = new TCHAR[desc.length()+2]; 396 wcsncpy(d, desc.c_str(), desc.length() );396 wcsncpy(d, desc.c_str(), desc.length()+1); 397 397 descr.lpDescription = d; 398 398 BOOL bResult = FChangeServiceConfig2(schService, SERVICE_CONFIG_DESCRIPTION, &descr); -
include/net/net.hpp
re396b2f rc74d7b6 93 93 }; 94 94 95 typedef publicbase_url<std::string, std::stringstream, string_traits> url;96 typedef publicbase_url<std::wstring, std::wstringstream, wstring_traits> wurl;95 typedef base_url<std::string, std::stringstream, string_traits> url; 96 typedef base_url<std::wstring, std::wstringstream, wstring_traits> wurl; 97 97 98 98 inline wurl url_to_wide(const url &u) { -
include/nscapi/settings_object.hpp
r76540c3 rc74d7b6 36 36 37 37 38 template<class object_type = default_object_type, class object_reader = default_object_reader<default_object_type>>38 template<class t_object_type, class object_reader> 39 39 struct object_handler : boost::noncopyable { 40 typedef boost::optional< object_type> optional_object;41 typedef std::map<std::wstring, object_type> object_list_type;42 typedef object_handler< object_type, object_reader> my_type;40 typedef boost::optional<t_object_type> optional_object; 41 typedef std::map<std::wstring, t_object_type> object_list_type; 42 typedef object_handler<t_object_type, object_reader> my_type; 43 43 44 44 object_list_type object_list; … … 51 51 } 52 52 53 object_type add(boost::shared_ptr<nscapi::settings_proxy> proxy, std::wstring path, std::wstring alias, std::wstring value, bool is_template = false) {54 object_type object;53 t_object_type add(boost::shared_ptr<nscapi::settings_proxy> proxy, std::wstring path, std::wstring alias, std::wstring value, bool is_template = false) { 54 t_object_type object; 55 55 object.alias = alias; 56 56 object.value = value; … … 62 62 63 63 if (!object.parent.empty() && object.parent != alias & object.parent != object.alias) { 64 object_type parent;64 t_object_type parent; 65 65 optional_object tmp = find_object(object.parent); 66 66 if (!tmp) { … … 80 80 81 81 void rebuild(boost::shared_ptr<nscapi::settings_proxy> proxy) { 82 std::list< object_type> tmp;83 BOOST_FOREACH( object_list_type::value_typet, object_list) {82 std::list<t_object_type> tmp; 83 BOOST_FOREACH(const typename object_list_type::value_type &t, object_list) { 84 84 tmp.push_back(t.second); 85 85 } 86 86 object_list.clear(); 87 BOOST_FOREACH(const &object_itemo, tmp) {87 BOOST_FOREACH(const t_object_type &o, tmp) { 88 88 std::wstring::size_type pos = o.path.find_last_of(_T("/")); 89 89 if (pos == std::wstring::npos) … … 95 95 96 96 optional_object find_object(std::wstring alias) { 97 object_list_type::const_iterator cit = object_list.find(alias);97 typename object_list_type::const_iterator cit = object_list.find(alias); 98 98 if (cit != object_list.end()) 99 99 return optional_object(cit->second); … … 105 105 106 106 bool has_object(std::wstring alias) { 107 object_list_type::const_iterator cit = object_list.find(alias);107 typename object_list_type::const_iterator cit = object_list.find(alias); 108 108 if (cit != object_list.end()) 109 109 return true; … … 118 118 std::wstringstream ss; 119 119 ss << _T("Objects: "); 120 BOOST_FOREACH( object_list_type::value_typet, object_list) {120 BOOST_FOREACH(const typename object_list_type::value_type &t, object_list) { 121 121 ss << _T(", ") << t.first << _T(" = {") << t.second.to_wstring() + _T("} "); 122 122 } 123 123 ss << _T("Templates: "); 124 BOOST_FOREACH( object_list_type::value_typet, template_list) {124 BOOST_FOREACH(const typename object_list_type::value_type &t, template_list) { 125 125 ss << _T(", ") << t.first << _T(" = {") << t.second.to_wstring() + _T("} "); 126 126 } … … 128 128 } 129 129 130 void add_object( object_type object) {130 void add_object(t_object_type object) { 131 131 object_reader::post_process_object(object); 132 object_list_type::iterator cit = template_list.find(object.alias);132 typename object_list_type::iterator cit = template_list.find(object.alias); 133 133 if (cit != template_list.end()) 134 134 template_list.erase(cit); 135 135 object_list[object.alias] = object; 136 136 } 137 void add_template( object_type object) {138 object_list_type::const_iterator cit = object_list.find(object.alias);137 void add_template(t_object_type object) { 138 typename object_list_type::const_iterator cit = object_list.find(object.alias); 139 139 if (cit != object_list.end()) 140 140 return; -
libs/protobuf/plugin.proto
r9b9be81 rc74d7b6 312 312 message Entry { 313 313 enum Level { 314 LOG_DEBUG = 0;315 LOG_INFO = 1 0;316 LOG_WARNING = 20;317 LOG_ERROR = 30;318 LOG_CRITICAL = 40;314 LOG_DEBUG = 500; 315 LOG_INFO = 150; 316 LOG_WARNING = 50; 317 LOG_ERROR = 10; 318 LOG_CRITICAL = 1; 319 319 }; 320 320 required Level level = 1; -
modules/CheckNSCP/CheckNSCP.cpp
r8013c0c rc74d7b6 43 43 44 44 settings.alias().add_key_to_settings() 45 (_T("archive folder"), sh::w string_key(&crashFolder, CRASH_ARCHIVE_FOLDER),45 (_T("archive folder"), sh::wpath_key(&crashFolder, CRASH_ARCHIVE_FOLDER), 46 46 CRASH_ARCHIVE_FOLDER_KEY, _T("The archive folder for crash dunpes.")) 47 47 ; … … 90 90 int CheckNSCP::get_crashes(std::wstring &last_crash) { 91 91 #ifdef WIN32 92 NSC_DEBUG_MSG(_T("Crash folder is: ") + crashFolder); 92 93 if (!file_helpers::checks::is_directory(crashFolder)) { 93 94 return 0; -
modules/NSCAClient/NSCAClient.cpp
r72eea1f rc74d7b6 116 116 iter++; 117 117 } 118 } catch ( exception& e) {119 cerr << "Error: " << e.what() << endl;118 } catch (const std::exception& e) { 119 NSC_LOG_ERROR_STD(_T("Failed to resolve: ") + utf8::to_unicode(e.what())); 120 120 } 121 121 -
service/NSClient++.cpp
r523576e rc74d7b6 632 632 LOG_ERROR_CORE(_T("No crash handling configured")); 633 633 } else { 634 //g_exception_manager->StartMonitoring();634 g_exception_manager->StartMonitoring(); 635 635 } 636 636 } -
service/cli_parser.hpp
r523576e rc74d7b6 331 331 return 0; 332 332 } catch(std::exception & e) { 333 mainClient.log_error(__FILE__, __LINE__, std::string("Unable to parse command line (settings): ") + e.what());333 std::cerr << std::string("Unable to parse command line (settings): ") << e.what() << "\n"; 334 334 return 1; 335 335 } -
service/service_manager.hpp
r3bdaf18 rc74d7b6 26 26 } 27 27 static std::wstring get_default_arguments() { 28 return _T(" --service --run");28 return _T("service --run"); 29 29 } 30 30 inline void print_msg(std::wstring str) { … … 42 42 serviceControll::Install(service_name_, service_description, get_default_service_deps(), SERVICE_WIN32_OWN_PROCESS, args); 43 43 } catch (const serviceControll::SCException& e) { 44 print_error(_T("Service installation failed : ") + e.error_);44 print_error(_T("Service installation failed of '") + service_name_ + _T("' failed: ") + e.error_); 45 45 return -1; 46 46 } -
version.hpp
r72eea1f rc74d7b6 1 1 #ifndef VERSION_HPP 2 2 #define VERSION_HPP 3 #define PRODUCTVER 0,4,0,13 64 #define STRPRODUCTVER "0,4,0,13 6"3 #define PRODUCTVER 0,4,0,137 4 #define STRPRODUCTVER "0,4,0,137" 5 5 #define STRPRODUCTDATE "2012-02-20" 6 6 #endif // VERSION_HPP -
version.txt
r72eea1f rc74d7b6 1 1 version=0.4.0 2 build=13 62 build=137 3 3 date=2012-02-20
Note: See TracChangeset
for help on using the changeset viewer.








