mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
6ba0c5fe01
commit
b621b00e3a
@ -32,11 +32,16 @@ void Zone::OnAllConfigLoaded(void)
|
||||
m_Parent = Zone::GetByName(GetParentRaw());
|
||||
|
||||
Zone::Ptr zone = m_Parent;
|
||||
int levels = 0;
|
||||
|
||||
while (zone) {
|
||||
m_AllParents.push_back(zone);
|
||||
|
||||
zone = Zone::GetByName(zone->GetParentRaw());
|
||||
levels++;
|
||||
|
||||
if (levels > 32)
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Infinite recursion detected while resolving zone graph. Check your zone hierarchy.", GetDebugInfo()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user