Don't use the thread pool to compile Livestatus scripts

refs #8791
This commit is contained in:
Gunnar Beutner 2015-03-18 14:36:46 +01:00
parent 2c4f913a90
commit 2aa65f3f4c
2 changed files with 3 additions and 1 deletions

View File

@ -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; \

View File

@ -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);