Fix check_service returning Warning instead of Critical

fixes #5849
This commit is contained in:
Jean Flach 2017-12-13 17:48:16 +01:00
parent 3afdf644c9
commit 55aca4f3e5
1 changed files with 3 additions and 5 deletions

View File

@ -126,9 +126,7 @@ INT parseArguments(INT ac, WCHAR **av, po::variables_map& vm, printInfoStruct& p
printInfo.service = vm["service"].as<std::wstring>();
if (vm.count("warn")) {
printInfo.warn = true;
}
printInfo.warn = vm.count("warn");
if (vm.count("D"))
debug = TRUE;
@ -157,10 +155,10 @@ INT printOutput(CONST printInfoStruct& printInfo)
std::wcout << L"SERVICE \"" << printInfo.service << "\" OK RUNNING | service=4;;;1;7" << '\n';
break;
case WARNING:
std::wcout << L"SERVICE \"" << printInfo.service << "\"WARNING NOT RUNNING | service=" << printInfo.ServiceState << ";;;1;7" << '\n';
std::wcout << L"SERVICE \"" << printInfo.service << "\" WARNING NOT RUNNING | service=" << printInfo.ServiceState << ";;;1;7" << '\n';
break;
case CRITICAL:
std::wcout << L"SERVICE \"" << printInfo.service << "\"CRITICAL NOT RUNNING | service=" << printInfo.ServiceState << ";;;1;7" << '\n';
std::wcout << L"SERVICE \"" << printInfo.service << "\" CRITICAL NOT RUNNING | service=" << printInfo.ServiceState << ";;;1;7" << '\n';
break;
}