mirror of https://github.com/Icinga/icinga2.git
Get local endpoint if FromClient is not set and origin is local
This commit is contained in:
parent
22dc2f2393
commit
e4e0115c9d
|
@ -77,7 +77,12 @@ void ClusterEvents::EnqueueCheck(const MessageOrigin::Ptr& origin, const Diction
|
|||
|
||||
void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params) {
|
||||
|
||||
Endpoint::Ptr sourceEndpoint = origin->FromClient->GetEndpoint();
|
||||
Endpoint::Ptr sourceEndpoint;
|
||||
if (origin->FromClient) {
|
||||
sourceEndpoint = origin->FromClient->GetEndpoint();
|
||||
} else if (origin->IsLocal()){
|
||||
sourceEndpoint = Endpoint::GetLocalEndpoint();
|
||||
}
|
||||
|
||||
if (!sourceEndpoint || (origin->FromZone && !Zone::GetLocalZone()->IsChildOf(origin->FromZone))) {
|
||||
Log(LogNotice, "ClusterEvents")
|
||||
|
|
Loading…
Reference in New Issue