Skip to content
Snippets Groups Projects
Commit 1addf952 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

onPeerResponse: move request

Change-Id: I93782be5cd93c824d14e7c9871be47ed6527d836
parent 8d787734
No related branches found
No related tags found
No related merge requests found
......@@ -500,7 +500,7 @@ public:
const std::string& name = "");
void addNewMultiplexedSocket(const std::weak_ptr<DeviceInfo>& dinfo, const DeviceId& deviceId, const dht::Value::Id& vid, const std::shared_ptr<ConnectionInfo>& info);
void onPeerResponse(const PeerConnectionRequest& req);
void onPeerResponse(PeerConnectionRequest&& req);
void onDhtConnected(const dht::crypto::PublicKey& devicePk);
......@@ -1078,7 +1078,7 @@ ConnectionManager::Impl::sendChannelRequest(const std::weak_ptr<DeviceInfo>& din
}
void
ConnectionManager::Impl::onPeerResponse(const PeerConnectionRequest& req)
ConnectionManager::Impl::onPeerResponse(PeerConnectionRequest&& req)
{
auto device = req.owner->getLongId();
if (auto info = infos_.getInfo(device, req.id)) {
......@@ -1123,7 +1123,7 @@ ConnectionManager::Impl::onDhtConnected(const dht::crypto::PublicKey& devicePk)
shared->config_->logger->debug("[device {}] Received request", req.owner->getLongId());
}
if (req.isAnswer) {
shared->onPeerResponse(req);
shared->onPeerResponse(std::move(req));
} else {
// Async certificate checking
shared->findCertificate(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment