mirror of
				https://github.com/Icinga/icinga2.git
				synced 2025-11-03 21:25:56 +01:00 
			
		
		
		
	
							parent
							
								
									31c9406684
								
							
						
					
					
						commit
						aedef8af97
					
				@ -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);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,7 @@ using namespace icinga;
 | 
			
		||||
 | 
			
		||||
REGISTER_TYPE(CustomVarObject);
 | 
			
		||||
 | 
			
		||||
boost::signals2::signal<void (const CustomVarObject::Ptr&, const MessageOrigin&)> CustomVarObject::OnVarsChanged;
 | 
			
		||||
boost::signals2::signal<void (const CustomVarObject::Ptr&, const Dictionary::Ptr& vars, const MessageOrigin&)> 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
 | 
			
		||||
 | 
			
		||||
@ -58,8 +58,9 @@ class I2_ICINGA_API CustomVarObject : public ObjectImpl<CustomVarObject>
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	DECLARE_PTR_TYPEDEFS(CustomVarObject);
 | 
			
		||||
	DECLARE_TYPENAME(CustomVarObject);
 | 
			
		||||
 | 
			
		||||
	static boost::signals2::signal<void (const CustomVarObject::Ptr&, const MessageOrigin&)> OnVarsChanged;
 | 
			
		||||
	static boost::signals2::signal<void (const CustomVarObject::Ptr&, const Dictionary::Ptr& vars, const MessageOrigin&)> OnVarsChanged;
 | 
			
		||||
 | 
			
		||||
	Dictionary::Ptr GetVars(void) const;
 | 
			
		||||
	void SetVars(const Dictionary::Ptr& vars, const MessageOrigin& origin = MessageOrigin());
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user