mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
Throw config error when using global zones as parent
This commit is contained in:
parent
0f1715332a
commit
ee9be90fa7
@ -33,6 +33,9 @@ void Zone::OnAllConfigLoaded()
|
|||||||
|
|
||||||
m_Parent = Zone::GetByName(GetParentRaw());
|
m_Parent = Zone::GetByName(GetParentRaw());
|
||||||
|
|
||||||
|
if (m_Parent && m_Parent->IsGlobal())
|
||||||
|
BOOST_THROW_EXCEPTION(ScriptError("Zone '" + GetName() + "' can not have a global zone as parent.", GetDebugInfo()));
|
||||||
|
|
||||||
Zone::Ptr zone = m_Parent;
|
Zone::Ptr zone = m_Parent;
|
||||||
int levels = 0;
|
int levels = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user