Changeset d7e265d in nscp for modules/CheckExternalScripts


Ignore:
Timestamp:
08/25/11 07:59:17 (21 months ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
8840f09
Parents:
b38e845
Message:
  • Fixed some issues in the NSCPClient
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/CheckExternalScripts/CheckExternalScripts.cpp

    rb38e845 rd7e265d  
    157157      BOOST_FOREACH(std::wstring str, data.args) { 
    158158        if (first && !isAlias && !allowNasty_) { 
    159           if (str.find_first_of(NASTY_METACHARS) != std::wstring::npos) { 
    160             return nscapi::functions::create_simple_query_response_unknown(_T("Request contained illegal characters!"), _T(""), response, data.command); 
     159          if (str.find_first_of(NASTY_METACHARS_W) != std::wstring::npos) { 
     160            return nscapi::functions::create_simple_query_response_unknown(data.command, _T("Request contained illegal characters!"), _T(""), response); 
    161161 
    162162          } 
     
    191191    int result = process::executeProcess(process::exec_arguments(root_, cd.command + _T(" ") + xargs, timeout), message, perf); 
    192192    if (!nscapi::plugin_helper::isNagiosReturnCode(result)) { 
    193       nscapi::functions::create_simple_query_response(NSCAPI::returnUNKNOWN, _T("The command (") + cd.command + _T(") returned an invalid return code: ") + strEx::itos(result), _T(""), response, data.command); 
     193      nscapi::functions::create_simple_query_response_unknown(data.command, _T("The command (") + cd.command + _T(") returned an invalid return code: ") + strEx::itos(result), _T(""), response); 
    194194      return NSCAPI::returnUNKNOWN; 
    195195    } 
    196     nscapi::functions::create_simple_query_response(nscapi::plugin_helper::int2nagios(result), message, perf, response, data.command); 
     196    nscapi::functions::create_simple_query_response(data.command, nscapi::plugin_helper::int2nagios(result), message, perf, response); 
    197197    return result; 
    198198  } 
Note: See TracChangeset for help on using the changeset viewer.