mirror of https://github.com/Icinga/icinga2.git
RedisWriter#InsertObjectDependencies(): don't change config objects' attributes in-place
refs #52
This commit is contained in:
parent
d5d3f3e60c
commit
e60ca9bca9
|
@ -586,6 +586,7 @@ void RedisWriter::InsertObjectDependencies(const ConfigObject::Ptr& object, cons
|
|||
Dictionary::Ptr values;
|
||||
if (kv.second.IsObjectType<Dictionary>()) {
|
||||
values = kv.second;
|
||||
values = values->ShallowClone();
|
||||
} else if (kv.second.IsObjectType<Array>()) {
|
||||
values = new Dictionary({{"value", JsonEncode(kv.second)}});
|
||||
} else {
|
||||
|
@ -619,6 +620,7 @@ void RedisWriter::InsertObjectDependencies(const ConfigObject::Ptr& object, cons
|
|||
Dictionary::Ptr values;
|
||||
if (kv.second.IsObjectType<Dictionary>()) {
|
||||
values = kv.second;
|
||||
values = values->ShallowClone();
|
||||
} else if (kv.second.IsObjectType<Array>()) {
|
||||
values = new Dictionary({{"value", JsonEncode(kv.second)}});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue