diff --git a/CMakeLists.txt b/CMakeLists.txt index 273faec5b..716930c40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(libtorrent) +set (SOVERSION "8") +set (VERSION "1.1") set(sources web_connection_base @@ -316,10 +318,7 @@ endif() include_directories(${includes}) set_target_properties(torrent-rasterbar PROPERTIES - SOVERSION 1 - VERSION 1) - -set (VERSION "1.1.0") + SOVERSION ${SOVERSION}) get_property (COMPILETIME_OPTIONS_LIST DIRECTORY ${CMAKE_CURRENT_SOURCE_DIRECTORY} @@ -341,7 +340,7 @@ else() set (LIBDIR "lib") endif() -install(TARGETS torrent-rasterbar DESTINATION ${LIBDIR} CONFIGURATIONS release) +install(TARGETS torrent-rasterbar DESTINATION ${LIBDIR}) install(DIRECTORY include/libtorrent DESTINATION include PATTERN ".svn" EXCLUDE) diff --git a/ChangeLog b/ChangeLog index 0acd9b107..c8a410b5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,10 @@ * almost completely changed the storage interface (for custom storage) * added support for hashing pieces in multiple threads + * remove potentially privacy leaking extension (non-anonymous mode) + * peer-id connection ordering fix in anonymous mode + * mingw fixes + 1.0.2 release * added missing force_proxy to python binding diff --git a/configure.ac b/configure.ac index 61212fc78..cd7374821 100644 --- a/configure.ac +++ b/configure.ac @@ -110,8 +110,9 @@ AC_CACHE_CHECK([for __attribute__((visibility("hidden")))], then AS_ECHO "found" ac_cv_hidden_visibility_attribute=yes - CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" + CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" CFLAGS="$CFLAGS -fvisibility=hidden" + LDFLAGS="$LDFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" fi rm -f visibility_conftest.* ]) diff --git a/examples/connection_tester.cpp b/examples/connection_tester.cpp index 589ce2829..884a77b30 100644 --- a/examples/connection_tester.cpp +++ b/examples/connection_tester.cpp @@ -48,6 +48,14 @@ POSSIBILITY OF SUCH DAMAGE. #include #include +#if BOOST_ASIO_DYN_LINK +#if BOOST_VERSION >= 104500 +#include +#elif BOOST_VERSION >= 104400 +#include +#endif +#endif + using namespace libtorrent; using namespace libtorrent::detail; // for write_* and read_* diff --git a/include/libtorrent/socket.hpp b/include/libtorrent/socket.hpp index 39ff5ccb5..f063d3b83 100644 --- a/include/libtorrent/socket.hpp +++ b/include/libtorrent/socket.hpp @@ -135,6 +135,7 @@ namespace libtorrent }; #endif +#ifdef IPV6_TCLASS struct traffic_class { traffic_class(char val): m_value(val) {} @@ -148,6 +149,7 @@ namespace libtorrent size_t size(Protocol const&) const { return sizeof(m_value); } int m_value; }; +#endif struct type_of_service { diff --git a/src/broadcast_socket.cpp b/src/broadcast_socket.cpp index 7e8dafce3..84e452b9b 100644 --- a/src/broadcast_socket.cpp +++ b/src/broadcast_socket.cpp @@ -261,7 +261,9 @@ namespace libtorrent // if_nametoindex was introduced in vista #if TORRENT_USE_IPV6 \ - && (!defined TORRENT_WINDOWS || _WIN32_WINNT >= _WIN32_WINNT_VISTA) + && (!defined TORRENT_WINDOWS || _WIN32_WINNT >= _WIN32_WINNT_VISTA) \ + && !defined TORRENT_MINGW + if (i->interface_address.is_v6() && i->interface_address.to_v6().is_link_local()) { address_v6 addr6 = i->interface_address.to_v6(); @@ -273,6 +275,7 @@ namespace libtorrent open_unicast_socket(ios, addr6, mask); continue; } + #endif open_multicast_socket(ios, i->interface_address, loopback, ec); #ifdef TORRENT_DEBUG diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index b963ca10a..89ce9bbb7 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -2284,18 +2284,6 @@ namespace libtorrent && t->share_mode()) handshake["share_mode"] = 1; - if (!m_settings.get_bool(settings_pack::anonymous_mode)) - { - tcp::endpoint ep = m_ses.get_ipv6_interface(); - if (!is_any(ep.address())) - { - std::string ipv6_address; - std::back_insert_iterator out(ipv6_address); - detail::write_address(ep.address(), out); - handshake["ipv6"] = ipv6_address; - } - } - // loop backwards, to make the first extension be the last // to fill in the handshake (i.e. give the first extensions priority) for (extension_list_t::reverse_iterator i = m_extensions.rbegin() @@ -3315,7 +3303,7 @@ namespace libtorrent // initiate connections. So, if our peer-id is greater than // the others, we should close the incoming connection, // if not, we should close the outgoing one. - if (pid < m_ses.get_peer_id() && is_outgoing()) + if (pid < m_our_peer_id && is_outgoing()) { p->disconnect(errors::duplicate_peer_id, op_bittorrent); } diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 0b86efd93..940d1b03c 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -520,7 +520,7 @@ namespace libtorrent peer_log(">>> SET_TOS[ tos: %d e: %s ]", m_settings.get_int(settings_pack::peer_tos), ec.message().c_str()); #endif } -#if TORRENT_USE_IPV6 +#if TORRENT_USE_IPV6 && defined IPV6_TCLASS else if (m_remote.address().is_v6() && m_settings.get_int(settings_pack::peer_tos) != 0) { m_socket->set_option(traffic_class(m_settings.get_int(settings_pack::peer_tos)), ec); @@ -6385,7 +6385,7 @@ namespace libtorrent peer_log(">>> SET_TOS[ tos: %d e: %s ]", m_settings.get_int(settings_pack::peer_tos), ec.message().c_str()); #endif } -#if TORRENT_USE_IPV6 +#if TORRENT_USE_IPV6 && defined IPV6_TCLASS else if (m_remote.address().is_v6() && m_settings.get_int(settings_pack::peer_tos) != 0) { m_socket->set_option(traffic_class(m_settings.get_int(settings_pack::peer_tos)), ec); diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 0d4efd330..37b0f4b51 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -7036,7 +7036,7 @@ retry: { error_code ec; -#if TORRENT_USE_IPV6 +#if TORRENT_USE_IPV6 && defined IPV6_TCLASS if (m_udp_socket.local_endpoint(ec).address().is_v6()) m_udp_socket.set_option(traffic_class(m_settings.get_int(settings_pack::peer_tos)), ec); else