From a2362ebf171dac9be340b1ffe487a9fefc1b243b Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 10 Aug 2022 13:24:44 +0200 Subject: [PATCH] IcingaDB::VersionChangedHandler(): don't handle not synced types not to surprise (and crash) the Icinga DB daemon with unknown types. --- lib/icingadb/icingadb-objects.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 4dc046f80..6834726c2 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -2725,6 +2725,10 @@ void IcingaDB::VersionChangedHandler(const ConfigObject::Ptr& object) { Type::Ptr type = object->GetReflectionType(); + if (m_IndexedTypes.find(type.get()) == m_IndexedTypes.end()) { + return; + } + if (object->IsActive()) { // Create or update the object config for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType()) {