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

Method GetHostService

lib/icinga/service.cpp:255–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255std::pair<Host::Ptr, Service::Ptr> icinga::GetHostService(const Checkable::Ptr& checkable)
256{
257 Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
258
259 if (service)
260 return std::make_pair(service->GetHost(), service);
261 else
262 return std::make_pair(static_pointer_cast<Host>(checkable), nullptr);
263}

Callers

nothing calls this directly

Calls 1

GetHostMethod · 0.45

Tested by

no test coverage detected