[icinga-checkins] icinga.org: icinga2/master: Fix that reminder notifications ignore HA mode

git at icinga.org git at icinga.org
Thu Jul 28 15:40:37 CEST 2016


Module: icinga2
Branch: master
Commit: b9d74449a99594f31a3cbe851fbeee57d3eead48
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=b9d74449a99594f31a3cbe851fbeee57d3eead48

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Jul 28 15:38:47 2016 +0200

Fix that reminder notifications ignore HA mode

fixes #12249

---

 lib/db_ido/dbconnection.cpp                |    3 ++-
 lib/notification/notificationcomponent.cpp |    6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/db_ido/dbconnection.cpp b/lib/db_ido/dbconnection.cpp
index 2b48fcc..5274e86 100644
--- a/lib/db_ido/dbconnection.cpp
+++ b/lib/db_ido/dbconnection.cpp
@@ -52,7 +52,8 @@ void DbConnection::OnConfigLoaded(void)
 	if (categories.IsNumber()) {
 		SetCategoryFilter(categories);
 		Log(LogWarning, "DbConnection")
-		    << "Specifying flags using '|' for 'categories' is deprecated. This functionality will be removed in 2.6.0. Please use an array.";
+		    << "Specifying flags using '|' for 'categories' for object '" << GetName() << "' of type '" << GetType() << "'"
+		    << " is deprecated. This functionality will be removed in 2.6.0. Please use an array.";
 	} else
 		SetCategoryFilter(FilterArrayToInt(categories, DbQuery::GetCategoryFilterMap(), DbCatEverything));
 
diff --git a/lib/notification/notificationcomponent.cpp b/lib/notification/notificationcomponent.cpp
index aafa281..20cfa01 100644
--- a/lib/notification/notificationcomponent.cpp
+++ b/lib/notification/notificationcomponent.cpp
@@ -75,11 +75,11 @@ void NotificationComponent::NotificationTimerHandler(void)
 		if (!notification->IsActive())
 			continue;
 
-		Checkable::Ptr checkable = notification->GetCheckable();
-
-		if (checkable->IsPaused() && GetEnableHA())
+		if (notification->IsPaused() && GetEnableHA())
 			continue;
 
+		Checkable::Ptr checkable = notification->GetCheckable();
+
 		if (!IcingaApplication::GetInstance()->GetEnableNotifications() || !checkable->GetEnableNotifications())
 			continue;
 



More information about the icinga-checkins mailing list