]> granicus.if.org Git - icinga2/commitdiff
Use an empty dictionary for the 'this' scope when executing commands with Livestatus
authorGunnar Beutner <gunnar@beutner.name>
Tue, 11 Aug 2015 11:58:02 +0000 (13:58 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 24 Aug 2015 09:17:09 +0000 (11:17 +0200)
fixes #9883

lib/livestatus/livestatusquery.cpp

index 9d904805ebbe8069c8f1bd17a1c1703a5da35aa3..71ad4eb5c7b40f9d25319eaf130b308209dfc4ad 100644 (file)
@@ -635,6 +635,7 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream)
        try {
                ScriptFrame frame;
                frame.Locals = lsf.Locals;
+               frame.Self = lsf.Locals;
                result = expr->Evaluate(frame);
        } catch (const ScriptError& ex) {
                delete expr;