diff --git a/src/session_impl.cpp b/src/session_impl.cpp index a92cfe772..4cdf3b0c9 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -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) diff --git a/src/torrent.cpp b/src/torrent.cpp index 1e89841d1..9b5cdcde8 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -430,8 +430,8 @@ namespace libtorrent for (std::set::iterator i = m_connections.begin() , end(m_connections.end()); i != end; ++i) { - bt_peer_connection* p = dynamic_cast(*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