mirror of https://github.com/Icinga/icinga2.git
parent
c66ac66219
commit
013690e486
|
@ -368,7 +368,10 @@ Value AExpression::OpSetPlus(const AExpression *expr, const Dictionary::Ptr& loc
|
|||
|
||||
Value result = left + expr->EvaluateOperand2(xlocals);
|
||||
|
||||
xlocals->Remove("__parent");
|
||||
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||
Dictionary::Ptr dict = result;
|
||||
dict->Remove("__parent");
|
||||
}
|
||||
|
||||
locals->Set(expr->m_Operand1, result);
|
||||
return result;
|
||||
|
@ -391,7 +394,10 @@ Value AExpression::OpSetMinus(const AExpression *expr, const Dictionary::Ptr& lo
|
|||
|
||||
Value result = left - expr->EvaluateOperand2(xlocals);
|
||||
|
||||
xlocals->Remove("__parent");
|
||||
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||
Dictionary::Ptr dict = result;
|
||||
dict->Remove("__parent");
|
||||
}
|
||||
|
||||
locals->Set(expr->m_Operand1, result);
|
||||
return result;
|
||||
|
@ -414,7 +420,10 @@ Value AExpression::OpSetMultiply(const AExpression *expr, const Dictionary::Ptr&
|
|||
|
||||
Value result = left * expr->EvaluateOperand2(xlocals);
|
||||
|
||||
xlocals->Remove("__parent");
|
||||
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||
Dictionary::Ptr dict = result;
|
||||
dict->Remove("__parent");
|
||||
}
|
||||
|
||||
locals->Set(expr->m_Operand1, result);
|
||||
return result;
|
||||
|
@ -437,7 +446,10 @@ Value AExpression::OpSetDivide(const AExpression *expr, const Dictionary::Ptr& l
|
|||
|
||||
Value result = left / expr->EvaluateOperand2(xlocals);
|
||||
|
||||
xlocals->Remove("__parent");
|
||||
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||
Dictionary::Ptr dict = result;
|
||||
dict->Remove("__parent");
|
||||
}
|
||||
|
||||
locals->Set(expr->m_Operand1, result);
|
||||
return result;
|
||||
|
|
|
@ -157,6 +157,8 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
|
|||
m_Properties->Set("__parent", m_Scope);
|
||||
GetLinkedExpressionList()->Evaluate(m_Properties);
|
||||
m_Properties->Remove("__parent");
|
||||
|
||||
VERIFY(m_Properties->Get("__type") == GetType() && m_Properties->Get("__name") == GetName());
|
||||
}
|
||||
|
||||
return m_Properties;
|
||||
|
|
Loading…
Reference in New Issue