merge RC_1_1 into master

This commit is contained in:
arvidn 2017-09-23 10:46:29 -07:00
commit 4c4c630fae
9 changed files with 30 additions and 21 deletions

View File

@ -105,10 +105,7 @@ install:
- 'if [[ $toolset == "gcc-arm" ]]; then
echo "using gcc : arm : ccache armv8l-linux-gnueabihf-g++ : <cxxflags>\"-std=c++11 -fsigned-char -march=armv8-a+crc -mfpu=crypto-neon-fp-armv8 -DTORRENT_FORCE_ARM_CRC32\" <linkflags>-lm ;" >> ~/user-config.jam;
fi;'
- 'echo "using darwin : : ccache clang++ :
<cxxflags>-I/usr/local/opt/openssl/include
<linkflags>-L/usr/local/opt/openssl/lib
<cxxflags>-std=c++11 ;" >> ~/user-config.jam'
- 'echo "using darwin : : ccache clang++ : <cxxflags>-std=c++11 ;" >> ~/user-config.jam'
- 'echo "using python : 2.7 ;" >> ~/user-config.jam'
- if [ "$docs" == "1" ]; then /Users/travis/Library/Python/2.7/bin/rst2html.py --version; fi
- 'if [ "$lint" == "1" ]; then curl "https://raw.githubusercontent.com/google/styleguide/71ec7f1e524969c19ce33cfc72e8e023f2b98ee2/cpplint/cpplint.py" >~/cpplint.py; fi'

View File

@ -79,6 +79,7 @@
1.1.5 release
* fix integer overflow in whole_pieces_threshold logic
* fix uTP path MTU discovery issue on windows (DF bit was not set correctly)
* fix python binding for torrent_handle, to be hashable
* fix IPv6 tracker support by performing the second announce in more cases

13
Jamfile
View File

@ -533,10 +533,15 @@ lib gcc : : <name>gcc <link>static ;
# when using iconv
lib libiconv : : <name>iconv <link>shared <search>/usr/local/lib ;
# openssl on linux/bsd/macos etc.
lib gcrypt : : <name>gcrypt <link>shared <search>/usr/local/lib : : <include>/usr/local/include ;
lib crypto : : <name>crypto <link>shared ;
lib ssl : : <name>ssl <link>shared <use>crypto ;
# openssl on linux/bsd etc.
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
# pick up openssl on macos from brew
lib crypto : : <name>crypto <target-os>darwin <search>/usr/local/opt/openssl/lib : <link>shared : <include>/usr/local/opt/openssl/include ;
lib ssl : : <name>ssl <use>crypto <target-os>darwin <search>/usr/local/opt/openssl/lib : <link>shared : <include>/usr/local/opt/openssl/include ;
lib crypto : : <name>crypto : <link>shared ;
lib ssl : : <name>ssl <use>crypto : <link>shared ;
lib libsocket : : <use>libnsl <name>socket <link>shared <search>/usr/sfw/lib <link>shared ;
lib libnsl : : <name>nsl <link>shared <search>/usr/sfw/lib <link>shared ;

View File

@ -56,7 +56,7 @@
<td><a href="streaming.html">streaming</a></td>
</tr>
<tr>
<td><a href="http://code.google.com/p/libtorrent/issues/entry">report a bug</a></td>
<td><a href="https://github.com/arvidn/libtorrent/issues">report a bug</a></td>
<td><a href="building.html">building</a></td>
<td><a href="bittorrent.pdf">bittorrent slides</a></td>
</tr>

View File

@ -67,7 +67,7 @@
<td><a href="streaming.html">streaming</a></td>
</tr>
<tr>
<td><a href="http://code.google.com/p/libtorrent/issues/entry">report a bug</a></td>
<td><a href="https://github.com/arvidn/libtorrent/issues">report a bug</a></td>
<td><a href="building.html">building</a></td>
<td><a href="bittorrent.pdf">bittorrent slides</a></td>
</tr>

View File

@ -908,7 +908,7 @@ namespace libtorrent {
storage_moved_alert(aux::stack_allocator& alloc
, torrent_handle const& h, string_view p);
TORRENT_DEFINE_ALERT(storage_moved_alert, 33)
TORRENT_DEFINE_ALERT_PRIO(storage_moved_alert, 33)
static constexpr alert_category_t static_category = alert::storage_notification;
std::string message() const override;
@ -933,7 +933,7 @@ namespace libtorrent {
, torrent_handle const& h, error_code const& e, string_view file
, operation_t op);
TORRENT_DEFINE_ALERT(storage_moved_failed_alert, 34)
TORRENT_DEFINE_ALERT_PRIO(storage_moved_failed_alert, 34)
static constexpr alert_category_t static_category = alert::storage_notification;
std::string message() const override;

View File

@ -1509,8 +1509,10 @@ namespace libtorrent {
// when a seeding torrent reaches either the share ratio (bytes up /
// bytes down) or the seed time ratio (seconds as seed / seconds as
// downloader) or the seed time limit (seconds as seed) it is
// considered done, and it will leave room for other torrents these
// are specified as percentages
// considered done, and it will leave room for other torrents. These
// are specified as percentages. Torrents that are considered done will
// still be allowed to be seeded, they just won't have priority anymore.
// For more, see queuing_.
share_ratio_limit,
seed_time_ratio_limit,

View File

@ -113,12 +113,16 @@ namespace libtorrent {
int prefer_contiguous_blocks = c.prefer_contiguous_blocks();
if (prefer_contiguous_blocks == 0 && !time_critical_mode)
if (prefer_contiguous_blocks == 0
&& !time_critical_mode
&& t.settings().get_int(settings_pack::whole_pieces_threshold) > 0)
{
int blocks_per_piece = t.torrent_file().piece_length() / t.block_size();
prefer_contiguous_blocks = c.statistics().download_payload_rate()
* t.settings().get_int(settings_pack::whole_pieces_threshold)
> t.torrent_file().piece_length() ? blocks_per_piece : 0;
int const blocks_per_piece = t.torrent_file().piece_length() / t.block_size();
prefer_contiguous_blocks
= (c.statistics().download_payload_rate()
> t.torrent_file().piece_length()
/ t.settings().get_int(settings_pack::whole_pieces_threshold))
? blocks_per_piece : 0;
}
// if we prefer whole pieces, the piece picker will pick at least

View File

@ -94,8 +94,8 @@ TORRENT_TEST(alerts_types)
TEST_ALERT_TYPE(block_finished_alert, 30, 0, alert::progress_notification);
TEST_ALERT_TYPE(block_downloading_alert, 31, 0, alert::progress_notification);
TEST_ALERT_TYPE(unwanted_block_alert, 32, 0, alert::peer_notification);
TEST_ALERT_TYPE(storage_moved_alert, 33, 0, alert::storage_notification);
TEST_ALERT_TYPE(storage_moved_failed_alert, 34, 0, alert::storage_notification);
TEST_ALERT_TYPE(storage_moved_alert, 33, 1, alert::storage_notification);
TEST_ALERT_TYPE(storage_moved_failed_alert, 34, 1, alert::storage_notification);
TEST_ALERT_TYPE(torrent_deleted_alert, 35, 1, alert::storage_notification);
TEST_ALERT_TYPE(torrent_delete_failed_alert, 36, 1, alert::storage_notification | alert::error_notification);
TEST_ALERT_TYPE(save_resume_data_alert, 37, 1, alert::storage_notification);