From 0ac1cd1ecbc18724753e0ac7509856ff5cb76403 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 15 Dec 2022 15:23:27 +0100 Subject: [PATCH] Rename Downtime::DowntimesExpireTimerHandler() to actually reflect its purpose. --- lib/icinga/downtime.cpp | 12 ++++++------ lib/icinga/downtime.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index f556eaa72..9d00d0ace 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -17,7 +17,7 @@ using namespace icinga; static int l_NextDowntimeID = 1; static std::mutex l_DowntimeMutex; static std::map l_LegacyDowntimesCache; -static Timer::Ptr l_DowntimesExpireTimer; +static Timer::Ptr l_DowntimesOrphanedTimer; static Timer::Ptr l_DowntimesStartTimer; boost::signals2::signal Downtime::OnDowntimeAdded; @@ -99,10 +99,10 @@ void Downtime::Start(bool runtimeCreated) l_DowntimesStartTimer->OnTimerExpired.connect([](const Timer * const&){ DowntimesStartTimerHandler(); }); l_DowntimesStartTimer->Start(); - l_DowntimesExpireTimer = Timer::Create(); - l_DowntimesExpireTimer->SetInterval(60); - l_DowntimesExpireTimer->OnTimerExpired.connect([](const Timer * const&) { DowntimesExpireTimerHandler(); }); - l_DowntimesExpireTimer->Start(); + l_DowntimesOrphanedTimer = Timer::Create(); + l_DowntimesOrphanedTimer->SetInterval(60); + l_DowntimesOrphanedTimer->OnTimerExpired.connect([](const Timer * const&) { DowntimesOrphanedTimerHandler(); }); + l_DowntimesOrphanedTimer->Start(); }); { @@ -540,7 +540,7 @@ void Downtime::DowntimesStartTimerHandler() } } -void Downtime::DowntimesExpireTimerHandler() +void Downtime::DowntimesOrphanedTimerHandler() { for (const Downtime::Ptr& downtime : ConfigType::GetObjectsByType()) { /* Only remove downtimes which are activated after daemon start. */ diff --git a/lib/icinga/downtime.hpp b/lib/icinga/downtime.hpp index 8629da1d9..15aa0af5d 100644 --- a/lib/icinga/downtime.hpp +++ b/lib/icinga/downtime.hpp @@ -91,7 +91,7 @@ private: void SetupCleanupTimer(); static void DowntimesStartTimerHandler(); - static void DowntimesExpireTimerHandler(); + static void DowntimesOrphanedTimerHandler(); }; }