]> granicus.if.org Git - icinga2/commitdiff
Check if flapping is enabled.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 29 Aug 2013 12:13:18 +0000 (14:13 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 29 Aug 2013 12:13:18 +0000 (14:13 +0200)
lib/icinga/service-flapping.cpp

index 56f7239c7a226680bda39f1c388e3758c74896aa..276e97730b67cf6044683044c7a87794ebcad756 100644 (file)
@@ -110,5 +110,8 @@ void Service::UpdateFlappingStatus(bool stateChange)
 
 bool Service::IsFlapping(void) const
 {
-       return GetFlappingCurrent() > GetFlappingThreshold();
+       if (!GetEnableFlapping())
+               return false;
+       else
+               return GetFlappingCurrent() > GetFlappingThreshold();
 }