summaryrefslogtreecommitdiff
path: root/src/channel.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2020-03-14 21:14:52 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2020-03-14 21:14:52 +0100
commit3357cbc91e7ff4d0d455c88785fc455067b34820 (patch)
treec1a39e4e55c3bcc03461838b4d8220c3e5a30987 /src/channel.cpp
parent9076a13c78cf64a6afafe98817aed31feda568b1 (diff)
Storage: filter ancestors and overwritable Ref and Stored
Simple but slow implementation of the filtering for now.
Diffstat (limited to 'src/channel.cpp')
-rw-r--r--src/channel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/channel.cpp b/src/channel.cpp
index 38d263e..50c5f97 100644
--- a/src/channel.cpp
+++ b/src/channel.cpp
@@ -84,7 +84,7 @@ optional<ChannelAcceptData> ChannelAcceptData::load(const Ref & ref)
Stored<Channel> ChannelAcceptData::channel() const
{
- const auto & st = request.ref.storage();
+ const auto & st = request.ref().storage();
if (auto secret = SecretKexKey::load(key))
return st.store(Channel(
@@ -166,12 +166,12 @@ optional<Stored<ChannelAccept>> Channel::acceptRequest(const Identity & self,
auto & peers = request->data->peers;
if (peers.size() != 2 ||
std::none_of(peers.begin(), peers.end(), [&self](const auto & x)
- { return x.ref.digest() == self.ref()->digest(); }) ||
+ { return x.ref().digest() == self.ref()->digest(); }) ||
std::none_of(peers.begin(), peers.end(), [&peer](const auto & x)
- { return x.ref.digest() == peer.ref()->digest(); }))
+ { return x.ref().digest() == peer.ref()->digest(); }))
return nullopt;
- auto & st = request.ref.storage();
+ auto & st = request.ref().storage();
auto signKey = SecretKey::load(self.keyMessage());
if (!signKey)