client: fix delta sync of Compound

cf. cc5d382930
This commit is contained in:
Michael Davidsaver
2023-03-26 18:14:21 -07:00
parent f6d2e402bc
commit 92fb0a4afa
+9 -2
View File
@@ -554,9 +554,10 @@ void Connection::handle_MONITOR()
* copy unmarked from prototype -> data
*/
{
auto desc = Value::Helper::desc(info->prototype);
auto delta = Value::Helper::store_ptr(data);
auto complete = Value::Helper::store_ptr(info->prototype);
auto N = Value::Helper::desc(info->prototype)->size();
auto N = desc->size();
for(size_t i=0u; i < N; i++, delta++, complete++)
{
const auto src = delta->valid ? delta : complete;
@@ -578,7 +579,13 @@ void Connection::handle_MONITOR()
dst->as<shared_array<const void>>() = src->as<shared_array<const void>>();
break;
case StoreType::Compound:
dst->as<Value>().copyIn(&src->store, StoreType::Compound);
{
std::shared_ptr<impl::FieldStorage> sstore(Value::Helper::store(data),
src);
auto& dfld(dst->as<Value>());
Value::Helper::set_desc(dfld, &desc[i]);
Value::Helper::store(dfld) = std::move(sstore);
}
break;
}
}