forked from premiere/premiere-libtorrent
merged RC_1_1 into master
This commit is contained in:
commit
e829c1942a
|
@ -82,6 +82,10 @@
|
||||||
* resume data no longer has timestamps of files
|
* resume data no longer has timestamps of files
|
||||||
* require C++11 to build libtorrent
|
* require C++11 to build libtorrent
|
||||||
|
|
||||||
|
* fix tracker connection bind issue for IPv6 trackers
|
||||||
|
* fix error handling of some merkle torrents
|
||||||
|
* fix error handling of unsupported hard-links
|
||||||
|
|
||||||
1.1.6 release
|
1.1.6 release
|
||||||
|
|
||||||
* deprecate save_encryption_settings (they are part of the normal settings)
|
* deprecate save_encryption_settings (they are part of the normal settings)
|
||||||
|
|
|
@ -1083,6 +1083,13 @@ namespace {
|
||||||
m_files.set_piece_length(0);
|
m_files.set_piece_length(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (files.num_pieces() <= 0)
|
||||||
|
{
|
||||||
|
ec = errors::no_files_in_torrent;
|
||||||
|
// mark the torrent as invalid
|
||||||
|
m_files.set_piece_length(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
int const num_leafs = merkle_num_leafs(files.num_pieces());
|
int const num_leafs = merkle_num_leafs(files.num_pieces());
|
||||||
int const num_nodes = merkle_num_nodes(num_leafs);
|
int const num_nodes = merkle_num_nodes(num_leafs);
|
||||||
m_merkle_first_leaf = num_nodes - num_leafs;
|
m_merkle_first_leaf = num_nodes - num_leafs;
|
||||||
|
|
|
@ -71,6 +71,7 @@ EXTRA_DIST = Jamfile \
|
||||||
test_torrents/httpseed.torrent \
|
test_torrents/httpseed.torrent \
|
||||||
test_torrents/invalid_file_size.torrent \
|
test_torrents/invalid_file_size.torrent \
|
||||||
test_torrents/invalid_info.torrent \
|
test_torrents/invalid_info.torrent \
|
||||||
|
test_torrents/invalid_merkle.torrent \
|
||||||
test_torrents/invalid_name.torrent \
|
test_torrents/invalid_name.torrent \
|
||||||
test_torrents/invalid_name2.torrent \
|
test_torrents/invalid_name2.torrent \
|
||||||
test_torrents/invalid_name3.torrent \
|
test_torrents/invalid_name3.torrent \
|
||||||
|
|
|
@ -156,6 +156,7 @@ test_failing_torrent_t test_error_torrents[] =
|
||||||
{ "unaligned_pieces.torrent", errors::torrent_invalid_hashes },
|
{ "unaligned_pieces.torrent", errors::torrent_invalid_hashes },
|
||||||
{ "invalid_root_hash.torrent", errors::torrent_invalid_hashes },
|
{ "invalid_root_hash.torrent", errors::torrent_invalid_hashes },
|
||||||
{ "invalid_root_hash2.torrent", errors::torrent_missing_pieces },
|
{ "invalid_root_hash2.torrent", errors::torrent_missing_pieces },
|
||||||
|
{ "invalid_merkle.torrent", errors::no_files_in_torrent},
|
||||||
{ "invalid_file_size.torrent", errors::torrent_invalid_length },
|
{ "invalid_file_size.torrent", errors::torrent_invalid_length },
|
||||||
{ "invalid_symlink.torrent", errors::torrent_invalid_name },
|
{ "invalid_symlink.torrent", errors::torrent_invalid_name },
|
||||||
{ "many_pieces.torrent", errors::too_many_pieces_in_torrent },
|
{ "many_pieces.torrent", errors::too_many_pieces_in_torrent },
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
d10:cion datei15992e4:infod6:lengthi000e4:name4:temp12:piece lengthi12e9:root hash20:‚ž¼Œ&¾ÇJW›}ÜA4u,·¼‘‡ee
|
Loading…
Reference in New Issue