Browse Source

pass ident hash by value to transports thread

pull/157/head
orignal 10 years ago
parent
commit
d7c5c24ce4
  1. 4
      Transports.cpp
  2. 4
      Transports.h

4
Transports.cpp

@ -189,7 +189,7 @@ namespace transport @@ -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 @@ -215,7 +215,7 @@ namespace transport
it->second.delayedMessages.push_back (msg);
}
void Transports::PostMessages (const i2p::data::IdentHash& ident, std::vector<i2p::I2NPMessage *> msgs)
void Transports::PostMessages (i2p::data::IdentHash ident, std::vector<i2p::I2NPMessage *> msgs)
{
if (ident == i2p::context.GetRouterInfo ().GetIdentHash ())
{

4
Transports.h

@ -91,8 +91,8 @@ namespace transport @@ -91,8 +91,8 @@ namespace transport
void Run ();
void RequestComplete (std::shared_ptr<const i2p::data::RouterInfo> r, const i2p::data::IdentHash& ident);
void HandleRequestComplete (std::shared_ptr<const i2p::data::RouterInfo> 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<i2p::I2NPMessage *> msgs);
void PostMessage (i2p::data::IdentHash ident, i2p::I2NPMessage * msg);
void PostMessages (i2p::data::IdentHash ident, std::vector<i2p::I2NPMessage *> msgs);
void PostCloseSession (std::shared_ptr<const i2p::data::RouterInfo> router);
bool ConnectToPeer (const i2p::data::IdentHash& ident, Peer& peer);

Loading…
Cancel
Save