Fix livestatus query on commands table with custom vars

fixes #8452
This commit is contained in:
Michael Friedrich 2015-02-16 14:16:45 +01:00
parent 8d5b270812
commit 0b273a0450
1 changed files with 6 additions and 0 deletions

View File

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