mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
parent
e7a1c83004
commit
0d5592a615
@ -636,13 +636,12 @@ void ApiListener::SyncRelayMessage(const MessageOrigin::Ptr& origin,
|
|||||||
|
|
||||||
Zone::Ptr target_zone = endpoint->GetZone();
|
Zone::Ptr target_zone = endpoint->GetZone();
|
||||||
|
|
||||||
allZones.insert(target_zone);
|
|
||||||
|
|
||||||
/* only relay messages to zones which have access to the object */
|
/* only relay messages to zones which have access to the object */
|
||||||
if (!target_zone->CanAccessObject(secobj)) {
|
if (!target_zone->CanAccessObject(secobj))
|
||||||
finishedLogZones.insert(target_zone);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
allZones.insert(target_zone);
|
||||||
|
|
||||||
/* don't relay messages to disconnected endpoints */
|
/* don't relay messages to disconnected endpoints */
|
||||||
if (!endpoint->GetConnected()) {
|
if (!endpoint->GetConnected()) {
|
||||||
|
@ -63,7 +63,7 @@ bool Zone::CanAccessObject(const ConfigObject::Ptr& object)
|
|||||||
{
|
{
|
||||||
Zone::Ptr object_zone;
|
Zone::Ptr object_zone;
|
||||||
|
|
||||||
if (dynamic_pointer_cast<Zone>(object))
|
if (object->GetReflectionType() == Zone::TypeInstance)
|
||||||
object_zone = static_pointer_cast<Zone>(object);
|
object_zone = static_pointer_cast<Zone>(object);
|
||||||
else
|
else
|
||||||
object_zone = static_pointer_cast<Zone>(object->GetZone());
|
object_zone = static_pointer_cast<Zone>(object->GetZone());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user