mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-12 16:24:41 +02:00
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());
|
ASSERT(!object->IsActive());
|
||||||
Log(LogDebug, "base", "Restoring object '" + name + "' of type '" + type + "'.");
|
Log(LogDebug, "base", "Restoring object '" + name + "' of type '" + type + "'.");
|
||||||
object->Deserialize(update, attributeTypes);
|
object->Deserialize(update, attributeTypes);
|
||||||
|
object->OnStateLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
restored++;
|
restored++;
|
||||||
|
@ -282,15 +282,16 @@ void ConfigItem::ActivateItems(void)
|
|||||||
/* restore the previous program state */
|
/* restore the previous program state */
|
||||||
DynamicObject::RestoreObjects(Application::GetStatePath());
|
DynamicObject::RestoreObjects(Application::GetStatePath());
|
||||||
|
|
||||||
BOOST_FOREACH(const DynamicObject::Ptr& object, objects) {
|
BOOST_FOREACH(const DynamicType::Ptr& type, DynamicType::GetTypes()) {
|
||||||
object->OnStateLoaded();
|
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() + "'");
|
||||||
Log(LogDebug, "config", "Activating object '" + object->GetName() + "' of type '" + object->GetType()->GetName() + "'");
|
object->Start();
|
||||||
object->Start();
|
|
||||||
|
|
||||||
ASSERT(object->IsActive());
|
ASSERT(object->IsActive());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ void Host::UpdateSlaveServices(void)
|
|||||||
|
|
||||||
ConfigItem::Ptr serviceItem = builder->Compile();
|
ConfigItem::Ptr serviceItem = builder->Compile();
|
||||||
DynamicObject::Ptr dobj = serviceItem->Commit();
|
DynamicObject::Ptr dobj = serviceItem->Commit();
|
||||||
dobj->Start();
|
dobj->OnConfigLoaded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ void Service::UpdateSlaveNotifications(void)
|
|||||||
|
|
||||||
ConfigItem::Ptr notificationItem = builder->Compile();
|
ConfigItem::Ptr notificationItem = builder->Compile();
|
||||||
DynamicObject::Ptr dobj = notificationItem->Commit();
|
DynamicObject::Ptr dobj = notificationItem->Commit();
|
||||||
dobj->Start();
|
dobj->OnConfigLoaded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user