mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Lock Objects during serialization
old behaviour was to only lock arrays, dictionaries and namespaces but not other objects
This commit is contained in:
parent
02db12ae02
commit
91296c2a25
@ -129,6 +129,8 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes,
|
|||||||
DictionaryData fields;
|
DictionaryData fields;
|
||||||
fields.reserve(type->GetFieldCount() + 1);
|
fields.reserve(type->GetFieldCount() + 1);
|
||||||
|
|
||||||
|
ObjectLock olock(input);
|
||||||
|
|
||||||
for (int i = 0; i < type->GetFieldCount(); i++) {
|
for (int i = 0; i < type->GetFieldCount(); i++) {
|
||||||
Field field = type->GetFieldInfo(i);
|
Field field = type->GetFieldInfo(i);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user