specify number of hops for a tunnel pool

This commit is contained in:
orignal 2014-06-25 19:28:33 -04:00
parent 92dc9b3542
commit ec21138bd2
6 changed files with 25 additions and 20 deletions

View file

@ -134,9 +134,9 @@ namespace tunnel
return m_LastHop;
}
size_t GetNumHops () const
int GetNumHops () const
{
size_t num = 0;
int num = 0;
TunnelHopConfig * hop = m_FirstHop;
while (hop)
{
@ -183,6 +183,8 @@ namespace tunnel
newConfig->m_LastHop = newHop;
if (hop->isGateway) // inbound tunnel
newHop->SetReplyHop (m_FirstHop); // use it as reply tunnel
else
newHop->SetNextRouter (&i2p::context.GetRouterInfo ());
}
if (!hop->next) newConfig->m_FirstHop = newHop; // last hop