]> granicus.if.org Git - icinga2/commitdiff
Make sure that the 'version' attribute is updated when config attributes are changed
authorGunnar Beutner <gunnar@beutner.name>
Wed, 14 Oct 2015 11:04:39 +0000 (13:04 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 14 Oct 2015 11:04:39 +0000 (13:04 +0200)
fixes #10355

lib/base/configobject.cpp

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