mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
RedisWriter: use one checksum algo for everything
This commit is contained in:
parent
b32b81d957
commit
dc73db01b8
@ -43,22 +43,12 @@ String RedisWriter::CalculateCheckSumString(const String& str)
|
|||||||
|
|
||||||
String RedisWriter::CalculateCheckSumGroups(const Array::Ptr& groups)
|
String RedisWriter::CalculateCheckSumGroups(const Array::Ptr& groups)
|
||||||
{
|
{
|
||||||
String output;
|
|
||||||
|
|
||||||
/* Ensure that checksums happen in a defined order. */
|
/* Ensure that checksums happen in a defined order. */
|
||||||
Array::Ptr tmpGroups = groups->ShallowClone();
|
Array::Ptr tmpGroups = groups->ShallowClone();
|
||||||
|
|
||||||
tmpGroups->Sort();
|
tmpGroups->Sort();
|
||||||
|
|
||||||
{
|
return SHA1(PackObject(tmpGroups));
|
||||||
ObjectLock olock(tmpGroups);
|
|
||||||
|
|
||||||
for (const String& group : tmpGroups) {
|
|
||||||
output += SHA1(group);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return SHA1(output);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String RedisWriter::CalculateCheckSumProperties(const ConfigObject::Ptr& object)
|
String RedisWriter::CalculateCheckSumProperties(const ConfigObject::Ptr& object)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user