]> granicus.if.org Git - icinga2/commitdiff
Make sure to use pretty-printed checksums in JSON blobs; remove semicolons
authorGunnar Beutner <gunnar.beutner@icinga.com>
Mon, 20 Mar 2017 09:35:20 +0000 (10:35 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 29 Mar 2017 08:17:03 +0000 (10:17 +0200)
refs #4991

lib/redis/rediswriter-utility.cpp

index 8a6b918a0d0504bae446a7d884f247acff011f77..3e38ec1dc35e9afd263422a66a96fb108a81cc9a 100644 (file)
@@ -38,25 +38,20 @@ String RedisWriter::FormatCheckSumBinary(const String& str)
 
 String RedisWriter::CalculateCheckSumString(const String& str)
 {
-       return SHA1(str, true);
+       return SHA1(str);
 }
 
 String RedisWriter::CalculateCheckSumGroups(const Array::Ptr& groups)
 {
        String output;
 
-       bool first = true;
+       ObjectLock olock(groups);
 
        for (const String& group : groups) {
-               if (first)
-                       first = false;
-               else
-                       output += ";";
-
                output += SHA1(group, true); //binary checksum required here
        }
 
-       return SHA1(output, false);
+       return SHA1(output);
 }
 
 String RedisWriter::CalculateCheckSumAttrs(const Dictionary::Ptr& attrs)