store shared pointer to RI in tunnel config

This commit is contained in:
orignal 2014-11-21 10:46:11 -05:00
parent 5187701af1
commit 8a357ac46c
7 changed files with 33 additions and 32 deletions

View file

@ -466,9 +466,9 @@ namespace tunnel
if (!inboundTunnel) return;
LogPrint ("Creating one hop outbound tunnel...");
CreateTunnel<OutboundTunnel> (
new TunnelConfig (std::vector<const i2p::data::RouterInfo *>
new TunnelConfig (std::vector<std::shared_ptr<const i2p::data::RouterInfo> >
{
i2p::data::netdb.GetRandomRouter ().get ()
i2p::data::netdb.GetRandomRouter ()
},
inboundTunnel->GetTunnelConfig ()));
}
@ -519,9 +519,9 @@ namespace tunnel
// trying to create one more inbound tunnel
LogPrint ("Creating one hop inbound tunnel...");
CreateTunnel<InboundTunnel> (
new TunnelConfig (std::vector<const i2p::data::RouterInfo *>
new TunnelConfig (std::vector<std::shared_ptr<const i2p::data::RouterInfo> >
{
i2p::data::netdb.GetRandomRouter ().get ()
i2p::data::netdb.GetRandomRouter ()
}));
}
}
@ -609,9 +609,9 @@ namespace tunnel
void Tunnels::CreateZeroHopsInboundTunnel ()
{
CreateTunnel<InboundTunnel> (
new TunnelConfig (std::vector<const i2p::data::RouterInfo *>
new TunnelConfig (std::vector<std::shared_ptr<const i2p::data::RouterInfo> >
{
&i2p::context.GetRouterInfo ()
i2p::context.GetSharedRouterInfo ()
}));
}
}