From b4f5ff90b610422fa19cce36770e808edaebd949 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 30 Aug 2013 15:56:03 +0200 Subject: [PATCH] Fix 'force' parameter for notifications. --- lib/icinga/service-notification.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/icinga/service-notification.cpp b/lib/icinga/service-notification.cpp index ba97c02ea..0ad7a2bed 100644 --- a/lib/icinga/service-notification.cpp +++ b/lib/icinga/service-notification.cpp @@ -48,15 +48,14 @@ void Service::ResetNotificationNumbers(void) void Service::SendNotifications(NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text) { - bool force = false; + bool force = GetForceNextNotification(); if (!GetEnableNotifications()) { - if (!GetForceNextNotification()) { + if (!force) { Log(LogInformation, "icinga", "Notifications are disabled for service '" + GetName() + "'."); return; } - force = true; SetForceNextNotification(false); }