value: make 'owner' a shared_ptr

This commit is contained in:
Adrien Béraud committed 2016-05-17 20:39:16 -04:00
1 parent 467fdef892
commit cc18afd818
4 files changed
+21 -18

No files matched your search

+2 -1
View File
@@ -142,7 +142,8 @@ Value::msgpack_unpack_body(const msgpack::object& o)
seq = rseq->as<decltype(seq)>();
else
throw msgpack::type_error();
owner.msgpack_unpack(*rowner);
owner = std::make_shared<crypto::PublicKey>();
owner->msgpack_unpack(*rowner);
if (auto rrecipient = findMapValue(*rbody, "to")) {
recipient = rrecipient->as<InfoHash>();
}