From: Gunnar Beutner Date: Wed, 14 Oct 2015 11:04:39 +0000 (+0200) Subject: Make sure that the 'version' attribute is updated when config attributes are changed X-Git-Tag: v2.4.0~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74aa5c1d6b44371d0df1f50b14bbac728fb6c06a;p=icinga2 Make sure that the 'version' attribute is updated when config attributes are changed fixes #10355 --- diff --git a/lib/base/configobject.cpp b/lib/base/configobject.cpp index 1e10da9a4..87cd3d910 100644 --- a/lib/base/configobject.cpp +++ b/lib/base/configobject.cpp @@ -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)