mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-17 12:51:49 +02:00
select introducers
This commit is contained in:
parent
119603845b
commit
44751955cc
6 changed files with 82 additions and 64 deletions
|
@ -507,14 +507,14 @@ namespace data
|
|||
return false;
|
||||
}
|
||||
|
||||
bool RouterInfo::RemoveIntroducer (uint32_t tag)
|
||||
bool RouterInfo::RemoveIntroducer (const boost::asio::ip::udp::endpoint& e)
|
||||
{
|
||||
for (auto& addr : m_Addresses)
|
||||
{
|
||||
if (addr.transportStyle == eTransportSSU && addr.host.is_v4 ())
|
||||
{
|
||||
for (std::vector<Introducer>::iterator it = addr.introducers.begin (); it != addr.introducers.begin (); it++)
|
||||
if (it->iTag == tag)
|
||||
if ( boost::asio::ip::udp::endpoint (it->iHost, it->iPort) == e)
|
||||
{
|
||||
addr.introducers.erase (it);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue