fix storage of banned peers lt 1645

This commit is contained in:
Marcos Pinto 2007-10-04 21:14:32 +00:00
parent c80a2e822b
commit b8a8757076
2 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,8 @@ namespace libtorrent
intrusive_ptr_base(intrusive_ptr_base<T> const&) intrusive_ptr_base(intrusive_ptr_base<T> const&)
: m_refs(0) {} : m_refs(0) {}
intrusive_ptr_base& operator=(intrusive_ptr_base const& rhs) {}
friend void intrusive_ptr_add_ref(intrusive_ptr_base<T> const* s) friend void intrusive_ptr_add_ref(intrusive_ptr_base<T> const* s)
{ {
assert(s->m_refs >= 0); assert(s->m_refs >= 0);

View File

@ -391,6 +391,14 @@ namespace detail
processing->torrent_ptr->get_policy().peer_from_tracker(*i, id processing->torrent_ptr->get_policy().peer_from_tracker(*i, id
, peer_info::resume_data, 0); , peer_info::resume_data, 0);
} }
for (std::vector<tcp::endpoint>::const_iterator i = processing->banned_peers.begin();
i != processing->banned_peers.end(); ++i)
{
policy::peer* p = processing->torrent_ptr->get_policy().peer_from_tracker(*i, id
, peer_info::resume_data, 0);
if (p) p->banned = true;
}
} }
else else
{ {