mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
parent
d65fb529eb
commit
1b81b85582
@ -189,11 +189,21 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool useTran
|
|||||||
checkSums->Set("name_checksum", CalculateCheckSumString(object->GetShortName()));
|
checkSums->Set("name_checksum", CalculateCheckSumString(object->GetShortName()));
|
||||||
checkSums->Set("environment_checksum", CalculateCheckSumString(GetEnvironment()));
|
checkSums->Set("environment_checksum", CalculateCheckSumString(GetEnvironment()));
|
||||||
|
|
||||||
/* 'zone' is available for all config objects, therefore calculate the checksum. */
|
auto endpoint (dynamic_pointer_cast<Endpoint>(object));
|
||||||
Zone::Ptr zone = static_pointer_cast<Zone>(object->GetZone());
|
|
||||||
|
|
||||||
if (zone)
|
if (endpoint) {
|
||||||
checkSums->Set("zone_checksum", GetIdentifier(zone));
|
auto endpointZone (endpoint->GetZone());
|
||||||
|
|
||||||
|
if (endpointZone) {
|
||||||
|
checkSums->Set("zone_checksum", GetIdentifier(endpointZone));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* 'zone' is available for all config objects, therefore calculate the checksum. */
|
||||||
|
auto zone (dynamic_pointer_cast<Zone>(object->GetZone()));
|
||||||
|
|
||||||
|
if (zone)
|
||||||
|
checkSums->Set("zone_checksum", GetIdentifier(zone));
|
||||||
|
}
|
||||||
|
|
||||||
User::Ptr user = dynamic_pointer_cast<User>(object);
|
User::Ptr user = dynamic_pointer_cast<User>(object);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user