From: Gunnar Beutner Date: Mon, 15 Oct 2012 06:45:14 +0000 (+0200) Subject: Bugfix: services property doesn't work when the first host definition is abstract. X-Git-Tag: v0.0.1~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e426548863cb0b9620a7ed412f9b1391a2cb9440;p=icinga2 Bugfix: services property doesn't work when the first host definition is abstract. Fixes #3300 --- diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 95fe7e0a3..b402780f0 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -29,8 +29,8 @@ Host::Host(const Dictionary::Ptr& properties) : DynamicObject(properties) { if (!m_InitializerDone) { - ConfigItem::OnCommitted.connect(boost::bind(&Host::ObjectCommittedHandler, this, _1)); - ConfigItem::OnRemoved.connect(boost::bind(&Host::ObjectRemovedHandler, this, _1)); + ConfigItem::OnCommitted.connect(boost::bind(&Host::ObjectCommittedHandler, _1)); + ConfigItem::OnRemoved.connect(boost::bind(&Host::ObjectRemovedHandler, _1)); m_InitializerDone = true; } diff --git a/lib/icinga/host.h b/lib/icinga/host.h index 48ef812b6..a8990b178 100644 --- a/lib/icinga/host.h +++ b/lib/icinga/host.h @@ -50,8 +50,8 @@ public: private: static bool m_InitializerDone; - void ObjectCommittedHandler(const ConfigItem::Ptr& item); - void ObjectRemovedHandler(const ConfigItem::Ptr& item); + static void ObjectCommittedHandler(const ConfigItem::Ptr& item); + static void ObjectRemovedHandler(const ConfigItem::Ptr& item); }; }