mirror of https://github.com/Icinga/icinga2.git
parent
2c4f913a90
commit
2aa65f3f4c
|
@ -29,6 +29,7 @@
|
||||||
void RegisterConfigFragment(void) \
|
void RegisterConfigFragment(void) \
|
||||||
{ \
|
{ \
|
||||||
icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment, false); \
|
icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment, false); \
|
||||||
|
VERIFY(expression); \
|
||||||
icinga::ScriptFrame frame; \
|
icinga::ScriptFrame frame; \
|
||||||
expression->Evaluate(frame); \
|
expression->Evaluate(frame); \
|
||||||
delete expression; \
|
delete expression; \
|
||||||
|
|
|
@ -630,9 +630,10 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream)
|
||||||
|
|
||||||
lsf.Lines[fileName] = m_Command;
|
lsf.Lines[fileName] = m_Command;
|
||||||
|
|
||||||
Expression *expr = ConfigCompiler::CompileText(fileName, m_Command);
|
Expression *expr = NULL;
|
||||||
Value result;
|
Value result;
|
||||||
try {
|
try {
|
||||||
|
expr = ConfigCompiler::CompileText(fileName, m_Command, false);
|
||||||
ScriptFrame frame;
|
ScriptFrame frame;
|
||||||
frame.Locals = lsf.Locals;
|
frame.Locals = lsf.Locals;
|
||||||
result = expr->Evaluate(frame);
|
result = expr->Evaluate(frame);
|
||||||
|
|
Loading…
Reference in New Issue