Skip to content

Commit 4c4c630

Browse files
committed
merge RC_1_1 into master
2 parents d22c44c + 08e861c commit 4c4c630

9 files changed

+30
-21
lines changed

.travis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ install:
105105
- 'if [[ $toolset == "gcc-arm" ]]; then
106106
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;
107107
fi;'
108-
- 'echo "using darwin : : ccache clang++ :
109-
<cxxflags>-I/usr/local/opt/openssl/include
110-
<linkflags>-L/usr/local/opt/openssl/lib
111-
<cxxflags>-std=c++11 ;" >> ~/user-config.jam'
108+
- 'echo "using darwin : : ccache clang++ : <cxxflags>-std=c++11 ;" >> ~/user-config.jam'
112109
- 'echo "using python : 2.7 ;" >> ~/user-config.jam'
113110
- if [ "$docs" == "1" ]; then /Users/travis/Library/Python/2.7/bin/rst2html.py --version; fi
114111
- 'if [ "$lint" == "1" ]; then curl "https://raw.githubusercontent.com/google/styleguide/71ec7f1e524969c19ce33cfc72e8e023f2b98ee2/cpplint/cpplint.py" >~/cpplint.py; fi'

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979

8080
1.1.5 release
8181

82+
* fix integer overflow in whole_pieces_threshold logic
8283
* fix uTP path MTU discovery issue on windows (DF bit was not set correctly)
8384
* fix python binding for torrent_handle, to be hashable
8485
* fix IPv6 tracker support by performing the second announce in more cases

Jamfile

+9-4
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,15 @@ lib gcc : : <name>gcc <link>static ;
533533
# when using iconv
534534
lib libiconv : : <name>iconv <link>shared <search>/usr/local/lib ;
535535

536-
# openssl on linux/bsd/macos etc.
537-
lib gcrypt : : <name>gcrypt <link>shared <search>/usr/local/lib : : <include>/usr/local/include ;
538-
lib crypto : : <name>crypto <link>shared ;
539-
lib ssl : : <name>ssl <link>shared <use>crypto ;
536+
# openssl on linux/bsd etc.
537+
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
538+
539+
# pick up openssl on macos from brew
540+
lib crypto : : <name>crypto <target-os>darwin <search>/usr/local/opt/openssl/lib : <link>shared : <include>/usr/local/opt/openssl/include ;
541+
lib ssl : : <name>ssl <use>crypto <target-os>darwin <search>/usr/local/opt/openssl/lib : <link>shared : <include>/usr/local/opt/openssl/include ;
542+
543+
lib crypto : : <name>crypto : <link>shared ;
544+
lib ssl : : <name>ssl <use>crypto : <link>shared ;
540545

541546
lib libsocket : : <use>libnsl <name>socket <link>shared <search>/usr/sfw/lib <link>shared ;
542547
lib libnsl : : <name>nsl <link>shared <search>/usr/sfw/lib <link>shared ;

docs/template.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<td><a href="streaming.html">streaming</a></td>
5757
</tr>
5858
<tr>
59-
<td><a href="http://code.google.com/p/libtorrent/issues/entry">report a bug</a></td>
59+
<td><a href="https://github.com/arvidn/libtorrent/issues">report a bug</a></td>
6060
<td><a href="building.html">building</a></td>
6161
<td><a href="bittorrent.pdf">bittorrent slides</a></td>
6262
</tr>

docs/template2.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<td><a href="streaming.html">streaming</a></td>
6868
</tr>
6969
<tr>
70-
<td><a href="http://code.google.com/p/libtorrent/issues/entry">report a bug</a></td>
70+
<td><a href="https://github.com/arvidn/libtorrent/issues">report a bug</a></td>
7171
<td><a href="building.html">building</a></td>
7272
<td><a href="bittorrent.pdf">bittorrent slides</a></td>
7373
</tr>

include/libtorrent/alert_types.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ namespace libtorrent {
908908
storage_moved_alert(aux::stack_allocator& alloc
909909
, torrent_handle const& h, string_view p);
910910

911-
TORRENT_DEFINE_ALERT(storage_moved_alert, 33)
911+
TORRENT_DEFINE_ALERT_PRIO(storage_moved_alert, 33)
912912

913913
static constexpr alert_category_t static_category = alert::storage_notification;
914914
std::string message() const override;
@@ -933,7 +933,7 @@ namespace libtorrent {
933933
, torrent_handle const& h, error_code const& e, string_view file
934934
, operation_t op);
935935

936-
TORRENT_DEFINE_ALERT(storage_moved_failed_alert, 34)
936+
TORRENT_DEFINE_ALERT_PRIO(storage_moved_failed_alert, 34)
937937

938938
static constexpr alert_category_t static_category = alert::storage_notification;
939939
std::string message() const override;

include/libtorrent/settings_pack.hpp

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

src/request_blocks.cpp

+9-5
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,16 @@ namespace libtorrent {
113113

114114
int prefer_contiguous_blocks = c.prefer_contiguous_blocks();
115115

116-
if (prefer_contiguous_blocks == 0 && !time_critical_mode)
116+
if (prefer_contiguous_blocks == 0
117+
&& !time_critical_mode
118+
&& t.settings().get_int(settings_pack::whole_pieces_threshold) > 0)
117119
{
118-
int blocks_per_piece = t.torrent_file().piece_length() / t.block_size();
119-
prefer_contiguous_blocks = c.statistics().download_payload_rate()
120-
* t.settings().get_int(settings_pack::whole_pieces_threshold)
121-
> t.torrent_file().piece_length() ? blocks_per_piece : 0;
120+
int const blocks_per_piece = t.torrent_file().piece_length() / t.block_size();
121+
prefer_contiguous_blocks
122+
= (c.statistics().download_payload_rate()
123+
> t.torrent_file().piece_length()
124+
/ t.settings().get_int(settings_pack::whole_pieces_threshold))
125+
? blocks_per_piece : 0;
122126
}
123127

124128
// if we prefer whole pieces, the piece picker will pick at least

test/test_alert_types.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ TORRENT_TEST(alerts_types)
9494
TEST_ALERT_TYPE(block_finished_alert, 30, 0, alert::progress_notification);
9595
TEST_ALERT_TYPE(block_downloading_alert, 31, 0, alert::progress_notification);
9696
TEST_ALERT_TYPE(unwanted_block_alert, 32, 0, alert::peer_notification);
97-
TEST_ALERT_TYPE(storage_moved_alert, 33, 0, alert::storage_notification);
98-
TEST_ALERT_TYPE(storage_moved_failed_alert, 34, 0, alert::storage_notification);
97+
TEST_ALERT_TYPE(storage_moved_alert, 33, 1, alert::storage_notification);
98+
TEST_ALERT_TYPE(storage_moved_failed_alert, 34, 1, alert::storage_notification);
9999
TEST_ALERT_TYPE(torrent_deleted_alert, 35, 1, alert::storage_notification);
100100
TEST_ALERT_TYPE(torrent_delete_failed_alert, 36, 1, alert::storage_notification | alert::error_notification);
101101
TEST_ALERT_TYPE(save_resume_data_alert, 37, 1, alert::storage_notification);

0 commit comments

Comments
 (0)