diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp index ef1c99067..ad44f05d5 100644 --- a/lib/icinga/checkable.cpp +++ b/lib/icinga/checkable.cpp @@ -255,6 +255,6 @@ void Checkable::SetModifiedAttributes(int flags, const MessageOrigin& origin) if ((flags & ModAttrCustomVariable) == 0) { SetOverrideVars(Empty); - OnVarsChanged(GetSelf(), origin); + OnVarsChanged(GetSelf(), GetVars(), origin); } } diff --git a/lib/icinga/command.cpp b/lib/icinga/command.cpp index 50930666a..d77a5e9f9 100644 --- a/lib/icinga/command.cpp +++ b/lib/icinga/command.cpp @@ -40,7 +40,7 @@ void Command::SetModifiedAttributes(int flags, const MessageOrigin& origin) { if ((flags & ModAttrCustomVariable) == 0) { SetOverrideVars(Empty); - OnVarsChanged(GetSelf(), origin); + OnVarsChanged(GetSelf(), GetVars(), origin); } } diff --git a/lib/icinga/customvarobject.cpp b/lib/icinga/customvarobject.cpp index cdb9b59cd..75ad2ed66 100644 --- a/lib/icinga/customvarobject.cpp +++ b/lib/icinga/customvarobject.cpp @@ -24,7 +24,7 @@ using namespace icinga; REGISTER_TYPE(CustomVarObject); -boost::signals2::signal CustomVarObject::OnVarsChanged; +boost::signals2::signal CustomVarObject::OnVarsChanged; Dictionary::Ptr CustomVarObject::GetVars(void) const { @@ -38,9 +38,7 @@ void CustomVarObject::SetVars(const Dictionary::Ptr& vars, const MessageOrigin& { SetOverrideVars(vars); - Log(LogNotice, "CustomVarObject", "Setting vars for object '" + GetName() + "'"); - - OnVarsChanged(GetSelf(), origin); + OnVarsChanged(GetSelf(), vars, origin); } int CustomVarObject::GetModifiedAttributes(void) const diff --git a/lib/icinga/customvarobject.hpp b/lib/icinga/customvarobject.hpp index d8903b239..47eedce48 100644 --- a/lib/icinga/customvarobject.hpp +++ b/lib/icinga/customvarobject.hpp @@ -58,8 +58,9 @@ class I2_ICINGA_API CustomVarObject : public ObjectImpl { public: DECLARE_PTR_TYPEDEFS(CustomVarObject); + DECLARE_TYPENAME(CustomVarObject); - static boost::signals2::signal OnVarsChanged; + static boost::signals2::signal OnVarsChanged; Dictionary::Ptr GetVars(void) const; void SetVars(const Dictionary::Ptr& vars, const MessageOrigin& origin = MessageOrigin()); diff --git a/lib/icinga/user.cpp b/lib/icinga/user.cpp index 6a2afdc87..543016eac 100644 --- a/lib/icinga/user.cpp +++ b/lib/icinga/user.cpp @@ -122,7 +122,7 @@ void User::SetModifiedAttributes(int flags, const MessageOrigin& origin) { if ((flags & ModAttrCustomVariable) == 0) { SetOverrideVars(Empty); - OnVarsChanged(GetSelf(), origin); + OnVarsChanged(GetSelf(), GetVars(), origin); } }