mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 16:44:29 +02:00
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) {
|
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))) {
|
if (!sourceEndpoint || (origin->FromZone && !Zone::GetLocalZone()->IsChildOf(origin->FromZone))) {
|
||||||
Log(LogNotice, "ClusterEvents")
|
Log(LogNotice, "ClusterEvents")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user