]> granicus.if.org Git - icinga2/commitdiff
Only update version when config attributes are changed
authorGunnar Beutner <gunnar@beutner.name>
Thu, 1 Oct 2015 02:45:50 +0000 (04:45 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 1 Oct 2015 02:45:50 +0000 (04:45 +0200)
refs #10257

lib/base/configobject.cpp

index 2c3a4ea18eb043ac8ca07bc031f9dc434765c73e..1e10da9a4e8f30ba7a8b94229f89bf768e753d45 100644 (file)
@@ -222,11 +222,12 @@ void ConfigObject::ModifyAttribute(const String& attr, const Value& value, bool
 
        SetField(fid, newValue);
 
-       if (updateVersion)
-               SetVersion(Utility::GetTime());
+       if (updated_original_attributes) {
+               if (updateVersion)
+                       SetVersion(Utility::GetTime());
 
-       if (updated_original_attributes)
                NotifyOriginalAttributes();
+       }
 }
 
 void ConfigObject::RestoreAttribute(const String& attr)