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:
Alexander A. Klimov 2022-08-10 13:24:44 +02:00
parent 32871ca40c
commit a2362ebf17
1 changed files with 4 additions and 0 deletions

View File

@ -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<IcingaDB>()) {