]> granicus.if.org Git - icinga2/commitdiff
Fix 'force' parameter for notifications.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 30 Aug 2013 13:56:03 +0000 (15:56 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 30 Aug 2013 13:56:03 +0000 (15:56 +0200)
lib/icinga/service-notification.cpp

index ba97c02ea5f60c5a72e16d622bf1ad9bd279e164..0ad7a2bed191db171e37e6be039bdc41c0f35068 100644 (file)
@@ -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);
        }