replace endpoint with address in DHT node ban list
This commit is contained in:
parent
7038dd3cd7
commit
bdd7e21831
|
@ -148,7 +148,7 @@ namespace libtorrent { namespace dht
|
||||||
struct node_ban_entry
|
struct node_ban_entry
|
||||||
{
|
{
|
||||||
node_ban_entry(): count(0) {}
|
node_ban_entry(): count(0) {}
|
||||||
udp::endpoint src;
|
address src;
|
||||||
ptime limit;
|
ptime limit;
|
||||||
int count;
|
int count;
|
||||||
};
|
};
|
||||||
|
|
|
@ -441,7 +441,7 @@ namespace libtorrent { namespace dht
|
||||||
ptime now = time_now();
|
ptime now = time_now();
|
||||||
for (node_ban_entry* i = m_ban_nodes; i < m_ban_nodes + num_ban_nodes; ++i)
|
for (node_ban_entry* i = m_ban_nodes; i < m_ban_nodes + num_ban_nodes; ++i)
|
||||||
{
|
{
|
||||||
if (i->src == ep)
|
if (i->src == ep.address())
|
||||||
{
|
{
|
||||||
match = i;
|
match = i;
|
||||||
break;
|
break;
|
||||||
|
@ -480,7 +480,7 @@ namespace libtorrent { namespace dht
|
||||||
{
|
{
|
||||||
min->count = 1;
|
min->count = 1;
|
||||||
min->limit = now + seconds(5);
|
min->limit = now + seconds(5);
|
||||||
min->src = ep;
|
min->src = ep.address();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||||
|
|
Loading…
Reference in New Issue