fix invalid assert in policy and fix minor cleanup issue

This commit is contained in:
Arvid Norberg 2012-04-10 05:28:48 +00:00
parent 816e56cc01
commit 333458f59d
1 changed files with 3 additions and 5 deletions

View File

@ -937,8 +937,6 @@ namespace libtorrent
(peer*)m_torrent->session().m_ipv4_peer_pool.malloc();
if (p == 0) return false;
TORRENT_ASSERT(p->in_use == false);
#if TORRENT_USE_IPV6
if (is_v6)
m_torrent->session().m_ipv6_peer_pool.set_next_size(500);
@ -1251,7 +1249,7 @@ namespace libtorrent
p->in_use = false;
#endif
m_torrent->session().m_i2p_peer_pool.free((i2p_peer*)p);
m_torrent->session().m_i2p_peer_pool.destroy((i2p_peer*)p);
return 0;
}
}
@ -1376,10 +1374,10 @@ namespace libtorrent
p->in_use = false;
#endif
#if TORRENT_USE_IPV6
if (is_v6) m_torrent->session().m_ipv6_peer_pool.free((ipv6_peer*)p);
if (is_v6) m_torrent->session().m_ipv6_peer_pool.destroy((ipv6_peer*)p);
else
#endif
m_torrent->session().m_ipv4_peer_pool.free((ipv4_peer*)p);
m_torrent->session().m_ipv4_peer_pool.destroy((ipv4_peer*)p);
return 0;
}
#ifndef TORRENT_DISABLE_EXTENSIONS