From: Michael Friedrich Date: Mon, 16 Feb 2015 13:16:45 +0000 (+0100) Subject: Fix livestatus query on commands table with custom vars X-Git-Tag: v2.3.0~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b273a0450edf3abcde5caf2a92d758537761d0b;p=icinga2 Fix livestatus query on commands table with custom vars fixes #8452 --- diff --git a/lib/livestatus/commandstable.cpp b/lib/livestatus/commandstable.cpp index b2178886a..756f1d322 100644 --- a/lib/livestatus/commandstable.cpp +++ b/lib/livestatus/commandstable.cpp @@ -109,6 +109,8 @@ Value CommandsTable::CustomVariableNamesAccessor(const Value& row) String key; Value value; + + ObjectLock xlock(vars); BOOST_FOREACH(tie(key, value), vars) { cv->Add(key); } @@ -137,6 +139,8 @@ Value CommandsTable::CustomVariableValuesAccessor(const Value& row) String key; Value value; + + ObjectLock xlock(vars); BOOST_FOREACH(tie(key, value), vars) { cv->Add(value); } @@ -165,6 +169,8 @@ Value CommandsTable::CustomVariablesAccessor(const Value& row) String key; Value value; + + ObjectLock xlock(vars); BOOST_FOREACH(tie(key, value), vars) { Array::Ptr key_val = new Array(); key_val->Add(key);