mirror of https://github.com/Icinga/icinga2.git
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 output;
|
||||
|
||||
/* Ensure that checksums happen in a defined order. */
|
||||
Array::Ptr tmpGroups = groups->ShallowClone();
|
||||
|
||||
tmpGroups->Sort();
|
||||
|
||||
{
|
||||
ObjectLock olock(tmpGroups);
|
||||
|
||||
for (const String& group : tmpGroups) {
|
||||
output += SHA1(group);
|
||||
}
|
||||
}
|
||||
|
||||
return SHA1(output);
|
||||
return SHA1(PackObject(tmpGroups));
|
||||
}
|
||||
|
||||
String RedisWriter::CalculateCheckSumProperties(const ConfigObject::Ptr& object)
|
||||
|
|
Loading…
Reference in New Issue