Browse Source

post LeaseSet creation to I2CP destnation's thread

pull/1645/head
orignal 4 years ago
parent
commit
ff9ee5873f
  1. 5
      libi2pd_client/I2CP.cpp
  2. 2
      libi2pd_client/I2CP.h

5
libi2pd_client/I2CP.cpp

@ -85,6 +85,11 @@ namespace client
} }
void I2CPDestination::CreateNewLeaseSet (std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels) void I2CPDestination::CreateNewLeaseSet (std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels)
{
GetService ().post (std::bind (&I2CPDestination::PostCreateNewLeaseSet, this, tunnels));
}
void I2CPDestination::PostCreateNewLeaseSet (std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels)
{ {
if (m_IsCreatingLeaseSet) if (m_IsCreatingLeaseSet)
{ {

2
libi2pd_client/I2CP.h

@ -101,6 +101,8 @@ namespace client
{ return std::static_pointer_cast<I2CPDestination>(shared_from_this ()); } { return std::static_pointer_cast<I2CPDestination>(shared_from_this ()); }
bool SendMsg (std::shared_ptr<I2NPMessage> msg, std::shared_ptr<const i2p::data::LeaseSet> remote); bool SendMsg (std::shared_ptr<I2NPMessage> msg, std::shared_ptr<const i2p::data::LeaseSet> remote);
void PostCreateNewLeaseSet (std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels);
private: private:
std::shared_ptr<I2CPSession> m_Owner; std::shared_ptr<I2CPSession> m_Owner;

Loading…
Cancel
Save