From a1a3cb7d0f0f0f356cb3dc55982b46f8a0b9e065 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 26 Jul 2012 12:28:29 +0200 Subject: [PATCH] Moved OnCheckResultReceived signal to the Service class. --- cib/cib.cpp | 1 - cib/cib.h | 2 -- cib/service.cpp | 2 ++ cib/service.h | 3 +++ components/cibsync/cibsynccomponent.cpp | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cib/cib.cpp b/cib/cib.cpp index c4ee26f2b..ef4c3bdca 100644 --- a/cib/cib.cpp +++ b/cib/cib.cpp @@ -22,7 +22,6 @@ using namespace icinga; RingBuffer CIB::m_TaskStatistics(15 * 60); -boost::signal CIB::OnCheckResultReceived; void CIB::UpdateTaskStatistics(long tv, int num) { diff --git a/cib/cib.h b/cib/cib.h index f371153d8..c64fb89a6 100644 --- a/cib/cib.h +++ b/cib/cib.h @@ -29,8 +29,6 @@ public: static void UpdateTaskStatistics(long tv, int num); static int GetTaskStatistics(long timespan); - static boost::signal OnCheckResultReceived; - private: static RingBuffer m_TaskStatistics; }; diff --git a/cib/service.cpp b/cib/service.cpp index 9f05eedda..bb22de639 100644 --- a/cib/service.cpp +++ b/cib/service.cpp @@ -21,6 +21,8 @@ using namespace icinga; +boost::signal Service::OnCheckResultReceived; + Service::Service(const ConfigObject::Ptr& configObject) : ConfigObjectAdapter(configObject) { diff --git a/cib/service.h b/cib/service.h index f2c58fe64..cc95758e1 100644 --- a/cib/service.h +++ b/cib/service.h @@ -39,6 +39,7 @@ enum ServiceStateType }; class CheckResult; +class CheckResultMessage; class ServiceStatusMessage; class I2_CIB_API Service : public ConfigObjectAdapter @@ -103,6 +104,8 @@ public: static string StateTypeToString(ServiceStateType state); static Dictionary::Ptr ResolveDependencies(Host host, const Dictionary::Ptr& dependencies); + + static boost::signal OnCheckResultReceived; }; } diff --git a/components/cibsync/cibsynccomponent.cpp b/components/cibsync/cibsynccomponent.cpp index 4d7aecda6..44113a5c2 100644 --- a/components/cibsync/cibsynccomponent.cpp +++ b/components/cibsync/cibsynccomponent.cpp @@ -93,7 +93,7 @@ void CIBSyncComponent::CheckResultRequestHandler(const Endpoint::Ptr& sender, co if (!params.GetCheckResult(&cr)) return; - CIB::OnCheckResultReceived(params); + Service::OnCheckResultReceived(service, params); service.ApplyCheckResult(cr); time_t now = Utility::GetTime(); -- 2.40.0