Changeset 8840f09 in nscp
- Timestamp:
- 08/26/11 13:40:23 (21 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 60e6c18
- Parents:
- d7e265d
- Files:
-
- 9 edited
-
changelog (modified) (2 diffs)
-
include/nscapi/macros.hpp (modified) (1 diff)
-
include/nscp/client/socket.hpp (modified) (4 diffs)
-
include/nscp/packet.hpp (modified) (3 diffs)
-
include/nscp/server/connection.cpp (modified) (3 diffs)
-
modules/NSCPClient/NSCPClient.cpp (modified) (13 diffs)
-
modules/NSCPClient/NSCPClient.h (modified) (4 diffs)
-
modules/NSCPServer/handler_impl.cpp (modified) (2 diffs)
-
service/NSClient++.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
changelog
rd7e265d r8840f09 6 6 * Fix RtlStringFromGUID problem on NT4 7 7 8 2011-08-25 MickeM 9 * Fixed some issues in the NSCPClient 10 * Fixed debug log issue in core 11 * Added support for "pushing" passive checks via NSCP 12 8 13 2011-08-24 MickeM 9 14 * Sever refactoring of the new API (there is now two pb files ipc for NSCP protocol and plugin for plugin communication) … … 11 16 * Fixed client argument for "client mode" to allow arbitrary arguments 12 17 * Cleaned up the argument processor code now requires "mode" to be first argument 13 * Fixed some issues in the NSCPClient14 18 15 19 2011-08-23 MickeM -
include/nscapi/macros.hpp
r65a2940 r8840f09 216 216 NSCAPI::nagiosReturn retCode = (&toObject)->commandRAWLineExec(command, request, response); \ 217 217 return GET_PLUGIN()->wrapCommandLineExec(retCode, response, response_buffer, response_len); \ 218 } catch (const std::exception &e) { \ 219 NSC_LOG_CRITICAL(_T("Exception in: commandLineExec(...)") + utf8::cvt<std::wstring>(e.what())); \ 220 std::wcerr << _T("Exception in: commandLineExec(...)") << utf8::cvt<std::wstring>(e.what()) << std::endl; \ 221 return NSCAPI::hasFailed; \ 218 222 } catch (...) { \ 219 223 NSC_LOG_CRITICAL(_T("Unknown exception in: commandLineExec(...)")); \ -
include/nscp/client/socket.hpp
rd7e265d r8840f09 62 62 writer->start_timer(timeout); 63 63 BOOST_FOREACH(const nscp::packet &chunk, chunks) { 64 std::wcout << _T(">>>") << chunk.signature.to_wstring() << std::endl; 64 65 if (!writer->write_and_wait(*socket_, get_socket(), boost::asio::buffer(chunk.to_buffer()))) { 65 66 std::cout << "FaILED TO SEND DATA..." << std::endl; … … 84 85 } 85 86 chunk.read_signature(buf); 86 std::wcout << chunk.signature.to_wstring() << std::endl;87 std::wcout << _T("<<<") << chunk.signature.to_wstring() << std::endl; 87 88 buf.resize(chunk.signature.payload_length); 88 89 … … 138 139 writer->start_timer(timeout); 139 140 BOOST_FOREACH(const nscp::packet &chunk, chunks) { 141 std::wcout << _T(">>>") << chunk.signature.to_wstring() << std::endl; 140 142 if (!writer->write_and_wait(*ssl_socket_, get_socket(), boost::asio::buffer(chunk.to_buffer()))) { 141 143 std::cout << "FaILED TO SEND DATA..." << std::endl; … … 161 163 } 162 164 chunk.read_signature(buf); 163 std::wcout << chunk.signature.to_wstring() << std::endl;165 std::wcout << _T("<<<") << chunk.signature.to_wstring() << std::endl; 164 166 buf.resize(chunk.signature.payload_length); 165 167 -
include/nscp/packet.hpp
rd7e265d r8840f09 81 81 } 82 82 83 std::wstring to_wstring() {83 std::wstring to_wstring() const { 84 84 std::wstringstream ss; 85 85 ss << _T("version: ") << version … … 179 179 } 180 180 181 static packet build_envelope_response(unsigned long additionl_packets) { 182 nscp::data::signature_packet signature; 183 signature.header_length = 0; 184 signature.header_type = 0; 185 186 signature.additional_packet_count = additionl_packets; 187 signature.version = nscp::data::version_1; 188 189 std::string buffer; 190 NSCPIPC::RequestEnvelope request_envelope; 191 request_envelope.set_version(NSCPIPC::Common_Version_VERSION_1); 192 request_envelope.set_max_supported_version(NSCPIPC::Common_Version_VERSION_1); 193 request_envelope.SerializeToString(&buffer); 194 195 signature.payload_length = buffer.size(); 196 signature.payload_type = nscp::data::envelope_response; 197 198 return packet(signature, "", buffer); 199 } 200 181 201 static nscp::data::signature_packet create_simple_sig(int payload_type, std::string::size_type size) { 182 202 nscp::data::signature_packet signature; … … 228 248 return packet(signature, "", buffer); 229 249 } 230 bool is_command_request() { 250 bool is_envelope_request() { 251 return signature.payload_type == nscp::data::envelope_request; 252 } 253 bool is_envelope_response() { 254 return signature.payload_type == nscp::data::envelope_response; 255 } 256 bool is_query_request() { 231 257 return signature.payload_type == nscp::data::command_request; 232 258 } 233 bool is_command_response() { 259 bool is_query_response() { 260 return signature.payload_type == nscp::data::command_response; 261 } 262 bool is_submit_message() { 234 263 return signature.payload_type == nscp::data::command_response; 235 264 } -
include/nscp/server/connection.cpp
rb38e845 r8840f09 87 87 start_read_request(buffer_, 30, helper); 88 88 } else { 89 if (outbound_queue_.size() > 0)90 outbound_queue_.push_front(nscp::packet::build_envelope_request(1));91 92 89 unsigned int count = outbound_queue_.size(); 93 handler_->log_debug(__FILE__, __LINE__, _T("Sending responses: ") + strEx::itos(count));90 outbound_queue_.push_front(nscp::packet::build_envelope_response(count)); 94 91 BOOST_FOREACH(nscp::packet &chunk, outbound_queue_) { 95 chunk.signature.additional_packet_count = --count;92 chunk.signature.additional_packet_count = count--; 96 93 std::string s = chunk.to_buffer(); 97 handler_->log_debug(__FILE__, __LINE__, _T("Sending: ") + chunk.signature.to_wstring()); 98 handler_->log_debug(__FILE__, __LINE__, _T("Sending: ") + utf8::cvt<std::wstring>(strEx::format_buffer(s.c_str(), s.size()))); 99 /* 100 std::vector<boost::asio::const_buffer> buffers; 101 response_buffers_.push_back(buf(s)); 102 start_write_request(buffers); 103 104 */ 94 handler_->log_debug(__FILE__, __LINE__, _T(">>>") + chunk.signature.to_wstring()); 105 95 response_buffers_.push_back(buf(s)); 106 96 } … … 116 106 sig = parser_.parse_signature(); 117 107 118 handler_->log_debug(__FILE__, __LINE__, _T(" Got signature with: ") + strEx::itos(sig.payload_length));108 handler_->log_debug(__FILE__, __LINE__, _T("<<<") + sig.to_wstring()); 119 109 if (sig.header_length > 0) { 120 110 // @todo read header … … 125 115 126 116 boost::tuple<bool, connection::process_helper> connection::process_payload() { 127 nscp::packet chunk(sig); 128 parser_.parse_payload(chunk); 129 handler_->log_debug(__FILE__, __LINE__, _T("Processing: ") + chunk.to_wstring()); 130 std::list<nscp::packet> result = handler_->process(chunk); 131 outbound_queue_.insert(outbound_queue_.end(), result.begin(), result.end()); 132 /* 117 nscp::packet packet(sig); 118 parser_.parse_payload(packet); 133 119 if (sig.payload_type == nscp::data::envelope_request) { 134 NSCPEnvelope::Request envelope; 135 envelope.ParseFromString(result); 136 handler_->log_debug(__FILE__, __LINE__, _T("Got envelope: ") + strEx::itos(envelope.version())); 137 } else if (sig.payload_type == nscp::data::command_request) { 138 PluginCommand::RequestMessage msg; 139 msg.ParseFromString(result); 140 handler_->log_debug(__FILE__, __LINE__, _T("Proessing command: ") + utf8::cvt<std::wstring>(msg.payload(0).command())); 141 outbound_queue_.push_back(nscp::packet::build_payload(nscp::data::command_response, handler_->process(result), 0)); 120 NSCPIPC::RequestEnvelope envelope; 121 envelope.ParseFromString(packet.payload); 142 122 } else { 143 handler_->log_error(__FILE__, __LINE__, _T("Unhandled packet: ") + strEx::itos(sig.payload_type)); 123 std::list<nscp::packet> result = handler_->process(packet); 124 outbound_queue_.insert(outbound_queue_.end(), result.begin(), result.end()); 144 125 } 145 */146 126 return boost::make_tuple(sig.additional_packet_count > 0, process_helper(&nscp::server::parser::digest_signature, &connection::process_signature)); 147 127 } -
modules/NSCPClient/NSCPClient.cpp
rd7e265d r8840f09 54 54 55 55 get_core()->registerCommand(_T("query_nscp"), _T("Submit a query to a remote host via NSCP")); 56 get_core()->registerCommand(_T("submit_nscp"), _T("Submit a query to a remote host via NSCP")); 56 57 //"/settings/NSCP/client/handlers" 57 58 sh::settings_registry settings(get_settings_proxy()); … … 95 96 } 96 97 97 void NSCPClient::add_ options(po::options_description &desc, nscp_connection_data &command_data) {98 void NSCPClient::add_common_options(po::options_description &desc, nscp_connection_data &command_data) { 98 99 desc.add_options() 99 100 ("host,H", po::wvalue<std::wstring>(&command_data.host), "The address of the host running the NSCP daemon") 100 101 ("port,p", po::value<int>(&command_data.port), "The port on which the daemon is running (default=5668)") 102 ("timeout,t", po::value<int>(&command_data.timeout), "Number of seconds before connection times out (default=10)") 103 ("no-ssl,n", po::value<bool>(&command_data.no_ssl)->zero_tokens()->default_value(false), "Do not initial an ssl handshake with the server, talk in plain text.") 104 ("query,q", po::bool_switch(&command_data.query), "Force query mode (only useful when this is not obvious)") 105 ("submit,s", po::bool_switch(&command_data.submit), "Force submit mode (only useful when this is not obvious)") 106 ; 107 } 108 void NSCPClient::add_query_options(po::options_description &desc, nscp_connection_data &command_data) { 109 desc.add_options() 101 110 ("command,c", po::wvalue<std::wstring>(&command_data.command), "The name of the command that the remote daemon should run") 102 ("timeout,t", po::value<int>(&command_data.timeout), "Number of seconds before connection times out (default=10)")103 ("no-ssl,n", po::value<bool>(&command_data.no_ssl)->zero_tokens()->default_value(false), "Do not initial an ssl handshake with the server, talk in plaintext.")104 111 ("arguments,a", po::wvalue<std::vector<std::wstring> >(&command_data.arguments), "list of arguments") 105 112 ; 106 113 } 114 void NSCPClient::add_submit_options(po::options_description &desc, nscp_connection_data &command_data) { 115 desc.add_options() 116 ("command,c", po::wvalue<std::wstring>(&command_data.command), "The name of the command that the remote daemon should run") 117 ("message,m", po::wvalue<std::wstring>(&command_data.message), "Message") 118 ("result,r", po::value<unsigned int>(&command_data.result), "Result code") 119 ; 120 } 107 121 108 122 void NSCPClient::add_server(std::wstring key, std::wstring args) { … … 115 129 boost::program_options::variables_map vm; 116 130 117 po::options_description desc("Allowed options"); 118 add_options(desc, command_data); 131 po::options_description common("Common options"); 132 add_common_options(common, command_data); 133 po::options_description query("Query options"); 134 add_query_options(query, command_data); 135 po::options_description submit("Submit options"); 136 add_submit_options(submit, command_data); 119 137 120 138 po::positional_options_description p; … … 130 148 } 131 149 150 po::options_description desc("Availible options"); 151 desc.add(common).add(query).add(submit); 132 152 po::wparsed_options parsed = po::basic_command_line_parser<wchar_t>(list).options(desc).positional(p).run(); 133 153 po::store(parsed, vm); … … 169 189 std::string line = payload.message(); 170 190 171 // @todo: Add performance data parsin here!191 // @todo: Add performance data parsing here! 172 192 //nscapi::functions::parse_performance_data(payload, perf); 173 193 //if (!payload.perf().empty()) … … 182 202 NSCAPI::nagiosReturn NSCPClient::handleCommand(const std::wstring &target, const std::wstring &command, std::list<std::wstring> &arguments, std::wstring &message, std::wstring &perf) { 183 203 if (command == _T("query_nscp")) { 204 return query_nscp(arguments, message, perf); 205 } 206 if (command == _T("submit_nscp")) { 184 207 return query_nscp(arguments, message, perf); 185 208 } … … 205 228 boost::program_options::variables_map vm; 206 229 230 po::options_description common("Common options"); 231 add_common_options(common, command_data); 232 po::options_description query("Query options"); 233 add_query_options(query, command_data); 234 207 235 po::options_description desc("Allowed options"); 208 add_options(desc, command_data);236 desc.add(common).add(query); 209 237 210 238 std::vector<std::wstring> vargs(arguments.begin(), arguments.end()); … … 235 263 } 236 264 237 int NSCPClient::commandLineExec(const std::wstring &command, std::list<std::wstring> &arguments, std::wstring &result) { 238 if (command != _T("query_nscp") && command != _T("help")) 239 return NSCAPI::returnIgnored; 265 bool NSCPClient::submit_nscp(std::list<std::wstring> &arguments, std::wstring &result) { 240 266 try { 241 267 NSCPClient::nscp_connection_data command_data; 242 268 boost::program_options::variables_map vm; 243 269 270 po::options_description common("Common options"); 271 add_common_options(common, command_data); 272 po::options_description submit("Submit options"); 273 add_submit_options(submit, command_data); 274 244 275 po::options_description desc("Allowed options"); 245 add_options(desc, command_data);276 desc.add(common).add(submit); 246 277 247 278 std::vector<std::wstring> vargs(arguments.begin(), arguments.end()); … … 252 283 po::notify(vm); 253 284 254 if (command == _T("help")) { 255 std::stringstream ss; 256 ss << "NSCPClient Command line syntax for command: query" << std::endl;; 257 ss << desc; 258 result = utf8::cvt<std::wstring>(ss.str()); 259 return NSCAPI::returnOK; 260 } 285 286 std::string buffer; 287 nscapi::functions::create_simple_query_response(command_data.command, command_data.result, command_data.message, _T(""), buffer); 288 std::list<std::string> errors = submit_nscp_command(command_data, buffer); 289 290 BOOST_FOREACH(std::string e, errors) { 291 result += utf8::cvt<std::wstring>(e) + _T("\n"); 292 } 293 } catch (boost::program_options::validation_error &e) { 294 result = _T("Error: ") + utf8::cvt<std::wstring>(e.what()); 295 return false; 296 } catch (...) { 297 result = _T("Unknown exception parsing command line"); 298 return false; 299 } 300 return true; 301 } 302 303 304 int NSCPClient::commandLineExec(const std::wstring &command, std::list<std::wstring> &arguments, std::wstring &result) { 305 NSCPClient::nscp_connection_data command_data; 306 if (command == _T("help")) { 307 po::options_description common("Common options"); 308 add_common_options(common, command_data); 309 po::options_description query("Query NSCP options"); 310 add_query_options(query, command_data); 311 po::options_description submit("Submit NSCP options"); 312 add_submit_options(submit, command_data); 313 po::options_description desc("Allowed options"); 314 desc.add(common).add(query).add(submit); 315 316 std::stringstream ss; 317 ss << "NSCPClient Command line syntax for command: query_nscp and submit_nscp" << std::endl;; 318 ss << desc; 319 result = utf8::cvt<std::wstring>(ss.str()); 320 return NSCAPI::returnOK; 321 } else if (command == _T("query_nscp")) { 322 boost::program_options::variables_map vm; 323 324 po::options_description common("Common options"); 325 add_common_options(common, command_data); 326 po::options_description query("Query NSCP options"); 327 add_query_options(query, command_data); 328 po::options_description desc("Allowed options"); 329 desc.add(common).add(query); 330 331 std::vector<std::wstring> vargs(arguments.begin(), arguments.end()); 332 po::positional_options_description p; 333 p.add("arguments", -1); 334 po::wparsed_options parsed = po::basic_command_line_parser<wchar_t>(vargs).options(desc).positional(p).run(); 335 po::store(parsed, vm); 336 po::notify(vm); 261 337 262 338 std::string buffer; … … 264 340 std::list<std::string> payloads = execute_nscp_command(command_data, buffer); 265 341 int ret = NSCAPI::returnUNKNOWN; 266 BOOST_FOREACH(std::string p, collect_result(payloads, ret)) { 342 std::list<std::string> strings = collect_result(payloads, ret); 343 BOOST_FOREACH(std::string p, strings) { 267 344 result += utf8::cvt<std::wstring>(p) + _T("\n"); 268 345 } 269 346 return ret; 270 } catch (std::exception &e) { 271 result = _T("Error: ") + utf8::cvt<std::wstring>(e.what()); 272 return NSCAPI::returnUNKNOWN; 273 } catch (...) { 274 result = _T("Unknown exception processing request"); 275 return NSCAPI::returnUNKNOWN; 276 } 277 return NSCAPI::returnUNKNOWN; 347 } else if (command == _T("submit_nscp")) { 348 boost::program_options::variables_map vm; 349 350 po::options_description common("Common options"); 351 add_common_options(common, command_data); 352 po::options_description submit("Submit NSCP options"); 353 add_submit_options(submit, command_data); 354 po::options_description desc("Allowed options"); 355 desc.add(common).add(submit); 356 357 std::vector<std::wstring> vargs(arguments.begin(), arguments.end()); 358 po::positional_options_description p; 359 p.add("arguments", -1); 360 po::wparsed_options parsed = po::basic_command_line_parser<wchar_t>(vargs).options(desc).positional(p).run(); 361 po::store(parsed, vm); 362 po::notify(vm); 363 364 std::string buffer; 365 nscapi::functions::create_simple_query_response(command_data.command, command_data.result, command_data.message, _T(""), buffer); 366 std::list<std::string> errors = submit_nscp_command(command_data, buffer); 367 BOOST_FOREACH(std::string p, errors) { 368 result += utf8::cvt<std::wstring>(p) + _T("\n"); 369 } 370 return NSCAPI::returnOK; 371 } 372 return NSCAPI::returnIgnored; 278 373 } 279 374 std::list<std::string> NSCPClient::execute_nscp_command(nscp_connection_data con, std::string buffer) { … … 285 380 chunks = send(con, chunks); 286 381 BOOST_FOREACH(nscp::packet &chunk, chunks) { 287 if (chunk.is_ command_response()) {382 if (chunk.is_query_response()) { 288 383 result.push_back(chunk.payload); 289 384 } else if (chunk.is_error()) { … … 305 400 } 306 401 307 std::list<nscp::packet> NSCPClient::send(nscp_connection_data &con, const std::list<nscp::packet> &chunks) { 308 std::list<nscp::packet> result; 402 std::list<std::string> NSCPClient::submit_nscp_command(nscp_connection_data con, std::string buffer) { 403 std::list<std::string> result; 404 try { 405 std::list<nscp::packet> chunks; 406 chunks.push_back(nscp::packet::create_payload(nscp::data::command_response, buffer, 0)); 407 chunks = send(con, chunks); 408 BOOST_FOREACH(nscp::packet &chunk, chunks) { 409 if (chunk.is_query_response()) { 410 result.push_back(chunk.payload); 411 } else if (chunk.is_error()) { 412 NSCPIPC::ErrorMessage message; 413 message.ParseFromString(chunk.payload); 414 for (int i=0;i<message.error_size();i++) { 415 result.push_back("Error: " + message.error(i).message()); 416 } 417 } else { 418 NSC_LOG_ERROR_STD(_T("Unsupported message type: ") + strEx::itos(chunk.signature.payload_type)); 419 } 420 //NSC_DEBUG_MSG_STD(_T("Found chunk: ") + utf8::cvt<std::wstring>(strEx::format_buffer(chunk.payload.c_str(), chunk.payload.size()))); 421 } 422 return result; 423 } catch (std::exception &e) { 424 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 425 return result; 426 } 427 } 428 429 std::list<nscp::packet> NSCPClient::send(nscp_connection_data &con, std::list<nscp::packet> &chunks) { 430 chunks.push_front(nscp::packet::build_envelope_request(1)); 431 std::list<nscp::packet> tmp, result; 309 432 if (!con.no_ssl) { 310 433 #ifdef USE_SSL 311 result= send_ssl(con.host, con.port, con.timeout, chunks);434 tmp = send_ssl(con.host, con.port, con.timeout, chunks); 312 435 #else 313 436 NSC_LOG_ERROR_STD(_T("SSL not avalible (not compiled with USE_SSL)")); … … 315 438 #endif 316 439 } else { 317 result = send_nossl(con.host, con.port, con.timeout, chunks); 440 tmp = send_nossl(con.host, con.port, con.timeout, chunks); 441 } 442 BOOST_FOREACH(nscp::packet &p, tmp) { 443 if (p.is_envelope_response()) { 444 std::cout << "Got envelope" << std::endl; 445 } else { 446 result.push_back(p); 447 } 318 448 } 319 449 return result; -
modules/NSCPClient/NSCPClient.h
rd7e265d r8840f09 34 34 std::wstring command; 35 35 std::wstring command_line; 36 std::wstring message; 37 unsigned int result; 38 bool submit; 39 bool query; 36 40 std::vector<std::wstring> arguments; 37 41 int port; … … 42 46 port(5668), 43 47 timeout(10), 44 no_ssl(false) 48 no_ssl(false), 49 submit(false), 50 query(false) 45 51 {} 46 52 std::wstring toString() { … … 51 57 ss << _T(", no_ssl: ") << no_ssl; 52 58 ss << _T(", command: ") << command; 59 ss << _T(", message: ") << message; 60 ss << _T(", result: ") << result; 53 61 int i=0; 54 62 BOOST_FOREACH(std::wstring a, arguments) { … … 98 106 99 107 private: 108 std::list<std::string> submit_nscp_command(nscp_connection_data con, std::string buffer); 100 109 std::list<std::string> execute_nscp_command(nscp_connection_data con, std::string buffer); 101 std::list<nscp::packet> send(nscp_connection_data &con, conststd::list<nscp::packet> &chunks);110 std::list<nscp::packet> send(nscp_connection_data &con, std::list<nscp::packet> &chunks); 102 111 std::list<nscp::packet> send_nossl(std::wstring host, int port, int timeout, const std::list<nscp::packet> &chunks); 103 112 std::list<nscp::packet> send_ssl(std::wstring host, int port, int timeout, const std::list<nscp::packet> &chunks); 104 void add_options(po::options_description &desc, nscp_connection_data &command_data); 113 void add_common_options(po::options_description &desc, nscp_connection_data &command_data); 114 void add_query_options(po::options_description &desc, nscp_connection_data &command_data); 115 void add_submit_options(po::options_description &desc, nscp_connection_data &command_data); 105 116 106 117 NSCAPI::nagiosReturn query_nscp(std::list<std::wstring> &arguments, std::wstring &message, std::wstring perf); 118 bool submit_nscp(std::list<std::wstring> &arguments, std::wstring &result); 107 119 108 120 private: -
modules/NSCPServer/handler_impl.cpp
rd7e265d r8840f09 12 12 Plugin::Common::Header hdr; 13 13 14 if (packet.is_ command_request()) {14 if (packet.is_query_request()) { 15 15 Plugin::QueryRequestMessage msg; 16 16 msg.ParseFromString(packet.payload); … … 55 55 result.push_back(nscp::packet::create_query_response(outBuffer)); 56 56 } 57 } else if (packet.is_query_response()) { 58 59 // @todo handle submission here 60 57 61 } else { 58 62 NSC_LOG_ERROR(_T("Unknown packet: ") + packet.to_wstring()); -
service/NSClient++.cpp
rb38e845 r8840f09 79 79 #define LOG_INFO_CORE(msg) { std::string s = nsclient::logger_helper::create_info(__FILE__, __LINE__, msg); mainClient.reportMessage(s); } 80 80 #define LOG_INFO_CORE_STD(msg) LOG_INFO_CORE(std::wstring(msg)) 81 #define LOG_DEBUG_CORE(msg) { std::string s = nsclient::logger_helper::create_debug(__FILE__, __LINE__, msg); mainClient.reportMessage(s);}81 #define LOG_DEBUG_CORE(msg) { if (mainClient.logDebug()) { std::string s = nsclient::logger_helper::create_debug(__FILE__, __LINE__, msg); mainClient.reportMessage(s); } } 82 82 #define LOG_DEBUG_CORE_STD(msg) LOG_DEBUG_CORE(std::wstring(msg)) 83 83
Note: See TracChangeset
for help on using the changeset viewer.








