]> granicus.if.org Git - icinga2/commitdiff
Bugfixes.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 21 Jun 2012 11:08:26 +0000 (13:08 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 21 Jun 2012 11:08:26 +0000 (13:08 +0200)
components/checker/checkercomponent.cpp
components/delegation/delegationcomponent.cpp
components/delegation/delegationcomponent.h

index 14364cba557cafed06a3811f0e255f06748aa3d9..cb55fa7266947ca072f71bb76c61c99cd9ead94c 100644 (file)
@@ -176,23 +176,13 @@ void CheckerComponent::AssignServiceRequestHandler(const Endpoint::Ptr& sender,
 
 void CheckerComponent::ClearServicesRequestHandler(const Endpoint::Ptr& sender, const RequestMessage& request)
 {
-       Application::Log(LogDebug, "checker", "Clearing service delegations.");
+       Application::Log(LogInformation, "checker", "Clearing service delegations.");
 
        /* clear the services lists */
        m_Services = ServiceQueue();
        m_PendingServices.clear();
 
        /* TODO: clear checks we've already sent to the thread pool */
-
-       string id;
-       if (request.GetID(&id)) {
-               ResponseMessage rm;
-               rm.SetID(id);
-
-               MessagePart result;
-               rm.SetResult(result);
-               GetEndpointManager()->SendUnicastMessage(m_CheckerEndpoint, sender, rm);
-       }
 }
 
 EXPORT_COMPONENT(checker, CheckerComponent);
index 9fa36001862a14e070c8829c098044fcb2875416..a05e077012a617abe4123e8415cfdb755a9d4757 100644 (file)
@@ -80,11 +80,13 @@ void DelegationComponent::AssignServiceResponseHandler(Service& service, const E
 
 void DelegationComponent::ClearServices(const Endpoint::Ptr& checker)
 {
+       RequestMessage request;
+       request.SetMethod("checker::ClearServices");
 
-}
+       MessagePart params;
+       request.SetParams(params);
 
-void DelegationComponent::RevokeServiceResponseHandler(Service& service, const Endpoint::Ptr& sender, bool timedOut)
-{
+       GetEndpointManager()->SendUnicastMessage(m_DelegationEndpoint, checker, request);
 }
 
 vector<Endpoint::Ptr> DelegationComponent::GetCheckerCandidates(const Service& service) const
index 0ab714737824b08a11a9d4223a1d095b2add0134..44140deb4fe10db71ef4d471c32f599064a899e9 100644 (file)
@@ -39,7 +39,6 @@ private:
        Timer::Ptr m_DelegationTimer;
 
        void AssignServiceResponseHandler(Service& service, const Endpoint::Ptr& sender, bool timedOut);
-       void RevokeServiceResponseHandler(Service& service, const Endpoint::Ptr& sender, bool timedOut);
 
        void DelegationTimerHandler(void);