From e295d76483fec7e911c95ae7caf78cabada2db05 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 1 May 2014 21:57:58 +0200 Subject: [PATCH] Checker: Fix exception on disabled host checks. Fixes #6103 --- components/checker/checkercomponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index a050ecc13..808bf6d62 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -147,11 +147,11 @@ void CheckerComponent::CheckThreadProc(void) Service::Ptr service; tie(host, service) = GetHostService(checkable); - if (!checkable->GetEnableActiveChecks() || (host && !service && !IcingaApplication::GetInstance()->GetEnableHostChecks())) { + if (host && !service && (!checkable->GetEnableActiveChecks() || !IcingaApplication::GetInstance()->GetEnableHostChecks())) { Log(LogDebug, "checker", "Skipping check for host '" + host->GetName() + "': active host checks are disabled"); check = false; } - if (!checkable->GetEnableActiveChecks() || (host && service && !IcingaApplication::GetInstance()->GetEnableServiceChecks())) { + if (host && service && (!checkable->GetEnableActiveChecks() || !IcingaApplication::GetInstance()->GetEnableServiceChecks())) { Log(LogDebug, "checker", "Skipping check for service '" + service->GetName() + "': active service checks are disabled"); check = false; } -- 2.40.0