]> granicus.if.org Git - icinga2/commitdiff
Fix uninitialized field in the CheckerComponent class
authorGunnar Beutner <gunnar@beutner.name>
Tue, 3 Mar 2015 08:14:15 +0000 (09:14 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 3 Mar 2015 08:14:15 +0000 (09:14 +0100)
lib/checker/checkercomponent.cpp
lib/checker/checkercomponent.hpp

index ca74315f8b5a60c925ed60869e79aa379de5ea00..1040a135ac99b63a7cc6945984b3bf6a7aaa788d 100644 (file)
@@ -59,6 +59,10 @@ void CheckerComponent::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr
        status->Set("checkercomponent", nodes);
 }
 
+CheckerComponent::CheckerComponent(void)
+    : m_Stopped(false)
+{ }
+
 void CheckerComponent::OnConfigLoaded(void)
 {
        DynamicObject::OnStarted.connect(bind(&CheckerComponent::ObjectHandler, this, _1));
@@ -73,8 +77,6 @@ void CheckerComponent::Start(void)
 {
        DynamicObject::Start();
 
-       m_Stopped = false;
-
        m_Thread = boost::thread(boost::bind(&CheckerComponent::CheckThreadProc, this));
 
        m_ResultTimer = new Timer();
index 01d63b7f486442803e34eaf0be5ec4ead9e5c227..9c11dfdc62f8fe8f24124caed7464987c203fcec 100644 (file)
@@ -68,6 +68,8 @@ public:
                >
        > CheckableSet;
 
+       CheckerComponent(void);
+
        virtual void OnConfigLoaded(void);
        virtual void Start(void);
        virtual void Stop(void);