}
}
- Host::Ptr host = GetHost();
- if (host)
- host->AddService(GetSelf());
+ m_Host = Host::GetByName(GetHostRaw());
+
+ if (m_Host)
+ m_Host->AddService(GetSelf());
UpdateSlaveNotifications();
}
Host::Ptr Service::GetHost(void) const
{
- return Host::GetByName(GetHostRaw());
+ return m_Host;
}
bool Service::IsHostCheck(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)