merged fixes from RC_1_0

This commit is contained in:
Arvid Norberg 2014-09-13 19:47:51 +00:00
parent eb32b1fef1
commit ad7d74f255
9 changed files with 28 additions and 23 deletions

View File

@ -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)

View File

@ -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

View File

@ -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.*
])

View File

@ -48,6 +48,14 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/array.hpp>
#include <boost/detail/atomic_count.hpp>
#if BOOST_ASIO_DYN_LINK
#if BOOST_VERSION >= 104500
#include <boost/asio/impl/src.hpp>
#elif BOOST_VERSION >= 104400
#include <boost/asio/impl/src.cpp>
#endif
#endif
using namespace libtorrent;
using namespace libtorrent::detail; // for write_* and read_*

View File

@ -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
{

View File

@ -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

View File

@ -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<std::string> 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);
}

View File

@ -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);

View File

@ -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