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