From 5e3e114a1612dfad63dd27e7ba860fd1454e4a52 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Mon, 29 Oct 2018 16:27:25 +0100 Subject: [PATCH] Handle icingadb- / icinga-type mismatches fixes servicedowntimes being written to hostdowntimes (and vice versa) --- lib/redis/rediswriter-objects.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index 52709c02a..920941950 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -98,6 +98,8 @@ void RedisWriter::UpdateAllConfigObjects() auto checksums = std::vector({"HMSET", m_PrefixConfigCheckSum + lcType}); for (const ConfigObject::Ptr& object : type.first->GetObjects()) { + if (lcType != GetLowerCaseTypeNameDB(object)) + continue; CreateConfigUpdate(object, lcType, attributes, customVars, checksums, false); SendStatusUpdate(object); bulkCounter++; @@ -165,7 +167,6 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool runtime void RedisWriter::MakeTypeChecksums(const ConfigObject::Ptr& object, std::set& propertiesBlacklist, Dictionary::Ptr& checkSums) { Endpoint::Ptr endpoint = dynamic_pointer_cast(object); - if (endpoint) { auto endpointZone(endpoint->GetZone());