Set check source only on local instance (empty authority).

Fixes #5824

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Michael Friedrich 2014-03-21 10:08:42 +01:00
parent bda7e9f362
commit f3f157d60d
1 changed files with 2 additions and 8 deletions

View File

@ -239,14 +239,8 @@ void Service::ProcessCheckResult(const CheckResult::Ptr& cr, const String& autho
if (cr->GetExecutionEnd() == 0)
cr->SetExecutionEnd(now);
String check_source = cr->GetCheckSource();
if (check_source.IsEmpty()) {
if (authority.IsEmpty())
cr->SetCheckSource(IcingaApplication::GetInstance()->GetNodeName());
else
cr->SetCheckSource(authority);
}
if (authority.IsEmpty())
cr->SetCheckSource(IcingaApplication::GetInstance()->GetNodeName());
bool reachable = IsReachable();
bool notification_reachable = IsReachable(DependencyNotification);