MCPcopy Create free account
hub / github.com/Icinga/icinga2 / wmain

Function wmain

plugins/check_service.cpp:262–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262int wmain(int argc, WCHAR **argv)
263{
264 po::variables_map vm;
265 printInfoStruct printInfo;
266
267 int ret = parseArguments(argc, argv, vm, printInfo);
268 if (ret != -1)
269 return ret;
270
271 if (vm.count("description"))
272 printInfo.service = getServiceByDescription(vm["service"].as<std::wstring>());
273
274 if (printInfo.service.empty()) {
275 std::wcout << "Could not find service matching description\n";
276 return 3;
277 }
278
279 printInfo.ServiceState = getServiceStatus(printInfo);
280 if (printInfo.ServiceState == -1)
281 return 3;
282
283 return printOutput(printInfo);
284}
285

Callers

nothing calls this directly

Calls 6

getServiceByDescriptionFunction · 0.85
getServiceStatusFunction · 0.85
countMethod · 0.80
parseArgumentsFunction · 0.70
printOutputFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected