From d7c5c24ce4da0ca6b8a7cc31606ef77e9acb4b98 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 2 Feb 2015 12:01:21 -0500 Subject: [PATCH] pass ident hash by value to transports thread --- Transports.cpp | 4 ++-- Transports.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Transports.cpp b/Transports.cpp index dfcfe253..2f0c95c0 100644 --- a/Transports.cpp +++ b/Transports.cpp @@ -189,7 +189,7 @@ namespace transport m_Service.post (std::bind (&Transports::PostMessages, this, ident, msgs)); } - void Transports::PostMessage (const i2p::data::IdentHash& ident, i2p::I2NPMessage * msg) + void Transports::PostMessage (i2p::data::IdentHash ident, i2p::I2NPMessage * msg) { if (ident == i2p::context.GetRouterInfo ().GetIdentHash ()) { @@ -215,7 +215,7 @@ namespace transport it->second.delayedMessages.push_back (msg); } - void Transports::PostMessages (const i2p::data::IdentHash& ident, std::vector msgs) + void Transports::PostMessages (i2p::data::IdentHash ident, std::vector msgs) { if (ident == i2p::context.GetRouterInfo ().GetIdentHash ()) { diff --git a/Transports.h b/Transports.h index d09699d6..e265f344 100644 --- a/Transports.h +++ b/Transports.h @@ -91,8 +91,8 @@ namespace transport void Run (); void RequestComplete (std::shared_ptr r, const i2p::data::IdentHash& ident); void HandleRequestComplete (std::shared_ptr r, const i2p::data::IdentHash& ident); - void PostMessage (const i2p::data::IdentHash& ident, i2p::I2NPMessage * msg); - void PostMessages (const i2p::data::IdentHash& ident, std::vector msgs); + void PostMessage (i2p::data::IdentHash ident, i2p::I2NPMessage * msg); + void PostMessages (i2p::data::IdentHash ident, std::vector msgs); void PostCloseSession (std::shared_ptr router); bool ConnectToPeer (const i2p::data::IdentHash& ident, Peer& peer);