if (origin.FromZone && !origin.FromZone->CanAccessObject(checkable) && endpoint != checkable->GetCommandEndpoint())
return Empty;
- checkable->ProcessCheckResult(cr, origin);
+ if (endpoint == checkable->GetCommandEndpoint())
+ checkable->ProcessCheckResult(cr);
+ else
+ checkable->ProcessCheckResult(cr, origin);
return Empty;
}
/* send message back to its origin */
Dictionary::Ptr message = ApiEvents::MakeCheckResultMessage(this, cr);
listener->SyncSendMessage(command_endpoint, message);
-
- /* HA cluster zone nodes must also process the check result locally
- * by fetching the real host/service object if existing
- */
- Host::Ptr tempHost;
- Service::Ptr tempService;
- tie(tempHost, tempService) = GetHostService(this);
- Host::Ptr realHost = Host::GetByName(tempHost->GetName());
- if (realHost) {
- Value agent_service_name = GetExtension("agent_service_name");
- if (!agent_service_name.IsEmpty()) {
- Checkable::Ptr realCheckable;
- realCheckable = realHost->GetServiceByShortName(agent_service_name);
- if (realCheckable) {
- realCheckable->ProcessCheckResult(cr, origin);
- }
- }
- }
-
}
return;