1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

cleanup exluded routers list for LeaseSets

This commit is contained in:
orignal 2014-03-23 11:12:11 -04:00
parent 74a7f8c869
commit 219f992d9e
2 changed files with 8 additions and 1 deletions

View File

@ -42,6 +42,11 @@ namespace data
return msg; return msg;
} }
void RequestedDestination::ClearExcludedPeers ()
{
m_ExcludedPeers.clear ();
}
#ifndef _WIN32 #ifndef _WIN32
const char NetDb::m_NetDbPath[] = "/netDb"; const char NetDb::m_NetDbPath[] = "/netDb";
#else #else
@ -353,6 +358,7 @@ namespace data
} }
if (msgs.size () > 0) if (msgs.size () > 0)
{ {
dest->ClearExcludedPeers ();
dest->SetLastOutboundTunnel (outbound); dest->SetLastOutboundTunnel (outbound);
outbound->SendTunnelDataMsg (msgs); outbound->SendTunnelDataMsg (msgs);
} }

View File

@ -30,7 +30,8 @@ namespace data
const IdentHash& GetDestination () const { return m_Destination; }; const IdentHash& GetDestination () const { return m_Destination; };
int GetNumExcludedPeers () const { return m_ExcludedPeers.size (); }; int GetNumExcludedPeers () const { return m_ExcludedPeers.size (); };
const std::set<IdentHash>& GetExcludedPeers () { return m_ExcludedPeers; }; const std::set<IdentHash>& GetExcludedPeers () { return m_ExcludedPeers; };
const RouterInfo * GetLastRouter () const { return m_LastRouter; }; void ClearExcludedPeers ();
const RouterInfo * GetLastRouter () const { return m_LastRouter; };
const i2p::tunnel::InboundTunnel * GetLastReplyTunnel () const { return m_LastReplyTunnel; }; const i2p::tunnel::InboundTunnel * GetLastReplyTunnel () const { return m_LastReplyTunnel; };
bool IsExploratory () const { return m_IsExploratory; }; bool IsExploratory () const { return m_IsExploratory; };
bool IsLeaseSet () const { return m_IsLeaseSet; }; bool IsLeaseSet () const { return m_IsLeaseSet; };