]> granicus.if.org Git - icinga2/commitdiff
Don't use the thread pool to compile Livestatus scripts
authorGunnar Beutner <gunnar@beutner.name>
Wed, 18 Mar 2015 13:36:46 +0000 (14:36 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 18 Mar 2015 13:36:46 +0000 (14:36 +0100)
refs #8791

lib/config/configfragment.hpp
lib/livestatus/livestatusquery.cpp

index 6a9e2b1d7aab6bb16d142c1fee0de7d14cea37d0..2000d8169388a5ef9bea74e337278d54edec9769 100644 (file)
@@ -29,6 +29,7 @@
                void RegisterConfigFragment(void) \
                { \
                        icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment, false); \
+                       VERIFY(expression); \
                        icinga::ScriptFrame frame; \
                        expression->Evaluate(frame); \
                        delete expression; \
index 053610bdc88aa29c36d587cd6f3faa42e391de8c..cc27fab8ce3e0317cfbfafbc1db005d5063b03c2 100644 (file)
@@ -630,9 +630,10 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream)
 
        lsf.Lines[fileName] = m_Command;
 
-       Expression *expr = ConfigCompiler::CompileText(fileName, m_Command);
+       Expression *expr = NULL;
        Value result;
        try {
+               expr = ConfigCompiler::CompileText(fileName, m_Command, false);
                ScriptFrame frame;
                frame.Locals = lsf.Locals;
                result = expr->Evaluate(frame);