Changeset 53be5c8 in nscp for service/NSClient++.cpp


Ignore:
Timestamp:
07/12/12 07:43:42 (11 months ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.1, 0.4.2
Children:
c327ce5
Parents:
6090c98
Message:
  • LUAScript: Improved lua scripting module a lot
  • LUAScript: Added protocol buffer support to lua scripts
  • tests: Rewrote (halfway there) test_nrpe python script as a lua script.
  • CheckEventLog: Fixed command name when submitting real-time "no action checks"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • service/NSClient++.cpp

    r52c5bf2 r53be5c8  
    10231023} 
    10241024 
    1025 int NSClientT::simple_exec(std::wstring module, std::wstring command, std::vector<std::wstring> arguments, std::list<std::wstring> &resp) { 
     1025int NSClientT::simple_exec(std::wstring command, std::vector<std::wstring> arguments, std::list<std::wstring> &resp) { 
    10261026  std::string request; 
    10271027  std::list<std::string> responses; 
    10281028  std::list<std::wstring> errors; 
    10291029  nscapi::functions::create_simple_exec_request(command, arguments, request); 
     1030  std::wstring module; 
     1031  std::wstring::size_type pos = command.find(L'.'); 
     1032  if (pos != std::wstring::npos) { 
     1033    module = command.substr(0, pos); 
     1034    command = command.substr(pos+1); 
     1035  } 
    10301036  int ret = load_and_run(module, boost::bind(&exec_helper, _1, command, arguments, request, &responses), errors); 
    10311037 
Note: See TracChangeset for help on using the changeset viewer.