Fix 'force' parameter for notifications.

This commit is contained in:
Gunnar Beutner 2013-08-30 15:56:03 +02:00
parent ce44c9e249
commit b4f5ff90b6
1 changed files with 2 additions and 3 deletions

View 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);
}