Handle icingadb- / icinga-type mismatches

fixes servicedowntimes being written to hostdowntimes (and vice versa)
This commit is contained in:
Jean Flach 2018-10-29 16:27:25 +01:00 committed by Michael Friedrich
parent 3c651b4c99
commit 5e3e114a16
1 changed files with 2 additions and 1 deletions

View File

@ -98,6 +98,8 @@ void RedisWriter::UpdateAllConfigObjects()
auto checksums = std::vector<String>({"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<String>& propertiesBlacklist, Dictionary::Ptr& checkSums)
{
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
if (endpoint) {
auto endpointZone(endpoint->GetZone());