mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
IcingaDB::AddObjectDataToRuntimeUpdates(): Copy data before modifying
This commit is contained in:
parent
6ddac83d81
commit
4fd1b153fa
@ -1160,10 +1160,11 @@ void IcingaDB::SendConfigUpdate(const ConfigObject::Ptr& object, bool runtimeUpd
|
||||
void IcingaDB::AddObjectDataToRuntimeUpdates(std::vector<Dictionary::Ptr>& runtimeUpdates, const String& objectKey,
|
||||
const String& redisKey, const Dictionary::Ptr& data)
|
||||
{
|
||||
data->Set("id", objectKey);
|
||||
data->Set("redis_key", redisKey);
|
||||
data->Set("runtime_type", "upsert");
|
||||
runtimeUpdates.emplace_back(data);
|
||||
Dictionary::Ptr dataClone = data->ShallowClone();
|
||||
dataClone->Set("id", objectKey);
|
||||
dataClone->Set("redis_key", redisKey);
|
||||
dataClone->Set("runtime_type", "upsert");
|
||||
runtimeUpdates.emplace_back(dataClone);
|
||||
}
|
||||
|
||||
// Takes object and collects IcingaDB relevant attributes and computes checksums. Returns whether the object is relevant
|
||||
|
Loading…
x
Reference in New Issue
Block a user