mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Don't seal DynamicObject updates.
This commit is contained in:
parent
686ea10213
commit
0d64a8fd32
@ -210,8 +210,6 @@ Array::Ptr Array::FromJson(cJSON *json)
|
||||
array->Add(Value::FromJson(i));
|
||||
}
|
||||
|
||||
array->Seal();
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
|
@ -277,8 +277,6 @@ Dictionary::Ptr Dictionary::FromJson(cJSON *json)
|
||||
dictionary->Set(i->string, Value::FromJson(i));
|
||||
}
|
||||
|
||||
dictionary->Seal();
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
|
@ -113,8 +113,6 @@ Dictionary::Ptr DynamicObject::BuildUpdate(double sinceTx, int attributeTypes) c
|
||||
}
|
||||
}
|
||||
|
||||
attrs->Seal();
|
||||
|
||||
Dictionary::Ptr update = boost::make_shared<Dictionary>();
|
||||
update->Set("attrs", attrs);
|
||||
|
||||
@ -123,8 +121,6 @@ Dictionary::Ptr DynamicObject::BuildUpdate(double sinceTx, int attributeTypes) c
|
||||
else if (attrs->GetLength() == 0)
|
||||
return Dictionary::Ptr();
|
||||
|
||||
update->Seal();
|
||||
|
||||
return update;
|
||||
}
|
||||
|
||||
@ -133,8 +129,6 @@ void DynamicObject::ApplyUpdate(const Dictionary::Ptr& serializedUpdate,
|
||||
{
|
||||
ObjectLock olock(this);
|
||||
|
||||
ASSERT(serializedUpdate->IsSealed());
|
||||
|
||||
Value configTxValue = serializedUpdate->Get("configTx");
|
||||
|
||||
boost::mutex::scoped_lock lock(m_AttributeMutex);
|
||||
@ -155,8 +149,6 @@ void DynamicObject::ApplyUpdate(const Dictionary::Ptr& serializedUpdate,
|
||||
|
||||
Dictionary::Ptr attrs = serializedUpdate->Get("attrs");
|
||||
|
||||
ASSERT(attrs->IsSealed());
|
||||
|
||||
{
|
||||
ObjectLock alock(attrs);
|
||||
|
||||
@ -167,8 +159,6 @@ void DynamicObject::ApplyUpdate(const Dictionary::Ptr& serializedUpdate,
|
||||
|
||||
Dictionary::Ptr attr = it->second;
|
||||
|
||||
ASSERT(attr->IsSealed());
|
||||
|
||||
int type = attr->Get("type");
|
||||
|
||||
if ((type & ~allowedTypes) != 0)
|
||||
@ -519,8 +509,6 @@ void DynamicObject::RestoreObjects(const String& filename)
|
||||
while (NetString::ReadStringFromStream(sfp, &message)) {
|
||||
Dictionary::Ptr persistentObject = Value::Deserialize(message);
|
||||
|
||||
ASSERT(persistentObject->IsSealed());
|
||||
|
||||
String type = persistentObject->Get("type");
|
||||
String name = persistentObject->Get("name");
|
||||
Dictionary::Ptr update = persistentObject->Get("update");
|
||||
|
Loading…
x
Reference in New Issue
Block a user