mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
specify number of hops for a tunnel pool
This commit is contained in:
parent
92dc9b3542
commit
ec21138bd2
6 changed files with 25 additions and 20 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue