mirror of https://github.com/Icinga/icinga2.git
Fix compiler warnings and style
This commit is contained in:
parent
ffa7b749cb
commit
a3c6797310
|
@ -461,7 +461,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||
for (int conflict : {NotificationProblem | NotificationRecovery, NotificationFlappingStart | NotificationFlappingEnd}) {
|
||||
/* E.g. problem and recovery notifications neutralize each other. */
|
||||
|
||||
if (suppressed_types_after & conflict == conflict) {
|
||||
if ((suppressed_types_after & conflict) == conflict) {
|
||||
suppressed_types_after &= ~conflict;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,6 +121,9 @@ static void FireSuppressedNotifications(Checkable* checkable)
|
|||
break;
|
||||
case NotificationFlappingEnd:
|
||||
still_applies = !checkable->IsFlapping();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (still_applies) {
|
||||
|
@ -128,12 +131,17 @@ static void FireSuppressedNotifications(Checkable* checkable)
|
|||
|
||||
switch (type) {
|
||||
case NotificationProblem:
|
||||
/* Fall through. */
|
||||
case NotificationRecovery:
|
||||
still_suppressed = !checkable->IsReachable(DependencyNotification) || checkable->IsInDowntime() || checkable->IsAcknowledged();
|
||||
break;
|
||||
case NotificationFlappingStart:
|
||||
/* Fall through. */
|
||||
case NotificationFlappingEnd:
|
||||
still_suppressed = checkable->IsInDowntime();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!still_suppressed && checkable->GetEnableActiveChecks()) {
|
||||
|
@ -169,6 +177,7 @@ static void FireSuppressedNotifications(Checkable* checkable)
|
|||
|
||||
if (subtract) {
|
||||
ObjectLock olock (checkable);
|
||||
|
||||
int suppressed_types_before (checkable->GetSuppressedNotifications());
|
||||
int suppressed_types_after (suppressed_types_before & ~subtract);
|
||||
|
||||
|
|
Loading…
Reference in New Issue