From 4fdaa40e37e323358ef3223b17a9a4af05f731c8 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 1 Apr 2013 06:27:27 +0000 Subject: [PATCH] merged encryption patch from RC_0_16 --- ChangeLog | 1 + docs/manual.rst | 2 +- src/policy.cpp | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2bd6fb32c..38a7ac669 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ * fix uTP edge case where udp socket buffer fills up * fix nagle implementation in uTP + * try unencrypted connections first, and fall back to encryption if it fails (performance improvement) * add missing functions to python binding (flush_cache(), remap_files() and orig_files()) * improve handling of filenames that are invalid on windows * support 'implied_port' in DHT announce_peer diff --git a/docs/manual.rst b/docs/manual.rst index fb8ee7cf8..b8b429171 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -608,7 +608,7 @@ manually control when the torrent leaves upload mode, don't make it auto managed ``flag_share_mode`` determines if the torrent should be added in *share mode* or not. Share mode indicates that we are not interested in downloading the torrent, but -merlely want to improve our share ratio (i.e. increase it). A torrent started in +merley want to improve our share ratio (i.e. increase it). A torrent started in share mode will do its best to never download more than it uploads to the swarm. If the swarm does not have enough demand for upload capacity, the torrent will not download anything. This mode is intended to be safe to add any number of torrents diff --git a/src/policy.cpp b/src/policy.cpp index 3248c6d64..9741dc68e 100644 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -1859,7 +1859,11 @@ namespace libtorrent , trust_points(0) , source(src) #ifndef TORRENT_DISABLE_ENCRYPTION - , pe_support(true) + // assume no support in order to + // prefer opening non-encrypyed + // connections. If it fails, we'll + // retry with encryption + , pe_support(false) #endif #if TORRENT_USE_IPV6 , is_v6_addr(false)