mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
IcingaDB::VersionChangedHandler(): don't handle not synced types
not to surprise (and crash) the Icinga DB daemon with unknown types.
This commit is contained in:
parent
32871ca40c
commit
a2362ebf17
@ -2725,6 +2725,10 @@ void IcingaDB::VersionChangedHandler(const ConfigObject::Ptr& object)
|
|||||||
{
|
{
|
||||||
Type::Ptr type = object->GetReflectionType();
|
Type::Ptr type = object->GetReflectionType();
|
||||||
|
|
||||||
|
if (m_IndexedTypes.find(type.get()) == m_IndexedTypes.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (object->IsActive()) {
|
if (object->IsActive()) {
|
||||||
// Create or update the object config
|
// Create or update the object config
|
||||||
for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
|
for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user