mirror of https://github.com/Icinga/icinga2.git
Another bugfix for the event order.
This commit is contained in:
parent
a3eed67774
commit
c9ec28440e
|
@ -292,6 +292,7 @@ void DynamicObject::RestoreObjects(const String& filename, int attributeTypes)
|
|||
ASSERT(!object->IsActive());
|
||||
Log(LogDebug, "base", "Restoring object '" + name + "' of type '" + type + "'.");
|
||||
object->Deserialize(update, attributeTypes);
|
||||
object->OnStateLoaded();
|
||||
}
|
||||
|
||||
restored++;
|
||||
|
|
|
@ -282,15 +282,16 @@ void ConfigItem::ActivateItems(void)
|
|||
/* restore the previous program state */
|
||||
DynamicObject::RestoreObjects(Application::GetStatePath());
|
||||
|
||||
BOOST_FOREACH(const DynamicObject::Ptr& object, objects) {
|
||||
object->OnStateLoaded();
|
||||
}
|
||||
BOOST_FOREACH(const DynamicType::Ptr& type, DynamicType::GetTypes()) {
|
||||
BOOST_FOREACH(const DynamicObject::Ptr& object, type->GetObjects()) {
|
||||
if (object->IsActive())
|
||||
continue;
|
||||
|
||||
BOOST_FOREACH(const DynamicObject::Ptr& object, objects) {
|
||||
Log(LogDebug, "config", "Activating object '" + object->GetName() + "' of type '" + object->GetType()->GetName() + "'");
|
||||
object->Start();
|
||||
Log(LogDebug, "config", "Activating object '" + object->GetName() + "' of type '" + object->GetType()->GetName() + "'");
|
||||
object->Start();
|
||||
|
||||
ASSERT(object->IsActive());
|
||||
ASSERT(object->IsActive());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ void Host::UpdateSlaveServices(void)
|
|||
|
||||
ConfigItem::Ptr serviceItem = builder->Compile();
|
||||
DynamicObject::Ptr dobj = serviceItem->Commit();
|
||||
dobj->Start();
|
||||
dobj->OnConfigLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ void Service::UpdateSlaveNotifications(void)
|
|||
|
||||
ConfigItem::Ptr notificationItem = builder->Compile();
|
||||
DynamicObject::Ptr dobj = notificationItem->Commit();
|
||||
dobj->Start();
|
||||
dobj->OnConfigLoaded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue