mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
ca9b31d4f0
commit
f7171e3e90
@ -72,9 +72,10 @@ void Service::OnConfigLoaded(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Host::Ptr host = GetHost();
|
m_Host = Host::GetByName(GetHostRaw());
|
||||||
if (host)
|
|
||||||
host->AddService(GetSelf());
|
if (m_Host)
|
||||||
|
m_Host->AddService(GetSelf());
|
||||||
|
|
||||||
UpdateSlaveNotifications();
|
UpdateSlaveNotifications();
|
||||||
}
|
}
|
||||||
@ -95,7 +96,7 @@ Service::Ptr Service::GetByNamePair(const String& hostName, const String& servic
|
|||||||
|
|
||||||
Host::Ptr Service::GetHost(void) const
|
Host::Ptr Service::GetHost(void) const
|
||||||
{
|
{
|
||||||
return Host::GetByName(GetHostRaw());
|
return m_Host;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Service::IsHostCheck(void) const
|
bool Service::IsHostCheck(void) const
|
||||||
@ -227,7 +228,7 @@ std::set<Host::Ptr> Service::GetParentHosts(void) const
|
|||||||
if (dependencies) {
|
if (dependencies) {
|
||||||
ObjectLock olock(dependencies);
|
ObjectLock olock(dependencies);
|
||||||
|
|
||||||
BOOST_FOREACH(const Value& dependency, dependencies) {
|
BOOST_FOREACH(const String& dependency, dependencies) {
|
||||||
Host::Ptr host = Host::GetByName(dependency);
|
Host::Ptr host = Host::GetByName(dependency);
|
||||||
|
|
||||||
if (!host)
|
if (!host)
|
||||||
|
@ -255,6 +255,8 @@ protected:
|
|||||||
virtual void OnConfigLoaded(void);
|
virtual void OnConfigLoaded(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Host::Ptr m_Host;
|
||||||
|
|
||||||
bool m_CheckRunning;
|
bool m_CheckRunning;
|
||||||
long m_SchedulingOffset;
|
long m_SchedulingOffset;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user