shared_ptr for tunnels

This commit is contained in:
orignal 2015-01-27 14:55:46 -05:00
parent d1d6797d3e
commit b3e08b2cf4
11 changed files with 74 additions and 95 deletions

View file

@ -475,7 +475,7 @@ namespace garlic
buf += 32;
uint32_t gwTunnel = bufbe32toh (buf);
buf += 4;
i2p::tunnel::OutboundTunnel * tunnel = nullptr;
std::shared_ptr<i2p::tunnel::OutboundTunnel> tunnel;
if (from && from->GetTunnelPool ())
tunnel = from->GetTunnelPool ()->GetNextOutboundTunnel ();
if (tunnel) // we have send it through an outbound tunnel