replace endpoint with address in DHT node ban list

This commit is contained in:
Arvid Norberg 2009-05-13 21:07:51 +00:00
parent 7038dd3cd7
commit bdd7e21831
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}; };

View File

@ -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