dynamic_cast fix

This commit is contained in:
Arvid Norberg 2009-11-27 21:04:26 +00:00
parent ddceb1487d
commit 39d14146e7
2 changed files with 5 additions and 3 deletions

View File

@ -291,9 +291,11 @@ namespace aux {
PRINT_SIZEOF(bt_peer_connection)
PRINT_SIZEOF(address)
PRINT_SIZEOF(address_v4)
PRINT_SIZEOF(address_v6)
PRINT_SIZEOF(address_v4::bytes_type)
#if TORRENT_USE_IPV6
PRINT_SIZEOF(address_v6)
PRINT_SIZEOF(address_v6::bytes_type)
#endif
PRINT_SIZEOF(void*)
PRINT_SIZEOF(dht::node_entry)

View File

@ -430,8 +430,8 @@ namespace libtorrent
for (std::set<peer_connection*>::iterator i = m_connections.begin()
, end(m_connections.end()); i != end; ++i)
{
bt_peer_connection* p = dynamic_cast<bt_peer_connection*>(*i);
if (p == 0) continue;
if ((*i)->type() != peer_connection::bittorrent_connection) continue;
bt_peer_connection* p = (bt_peer_connection*)*i;
p->write_upload_only();
}
#endif