merged RC_1_1 into master
This commit is contained in:
commit
db09332a02
|
@ -74,6 +74,8 @@
|
|||
* require C++11 to build libtorrent
|
||||
|
||||
|
||||
* corrected missing const qualifiers on bdecode_node
|
||||
* fix changing queue position of paused torrents (1.1.3 regression)
|
||||
* fix re-check issue after move_storage
|
||||
* handle invalid arguments to set_piece_deadline()
|
||||
* move_storage did not work for torrents without metadata
|
||||
|
|
|
@ -7894,8 +7894,9 @@ namespace libtorrent {
|
|||
|
||||
void torrent::queue_up()
|
||||
{
|
||||
// fix race conditions on async position change calls (from handler)
|
||||
if(!m_auto_managed || m_abort || is_finished()) return;
|
||||
// finished torrents may not change their queue positions, as it's set to
|
||||
// -1
|
||||
if (m_abort || is_finished()) return;
|
||||
|
||||
set_queue_position(queue_position() == 0
|
||||
? queue_position() : queue_position() - 1);
|
||||
|
@ -7910,8 +7911,9 @@ namespace libtorrent {
|
|||
{
|
||||
TORRENT_ASSERT(is_single_thread());
|
||||
|
||||
// fix race conditions on async position change calls (from handler)
|
||||
if ((!m_auto_managed || m_abort || is_finished()) && p != -1) return;
|
||||
// finished torrents may not change their queue positions, as it's set to
|
||||
// -1
|
||||
if ((m_abort || is_finished()) && p != -1) return;
|
||||
|
||||
TORRENT_ASSERT((p == -1) == is_finished()
|
||||
|| (!m_auto_managed && p == -1)
|
||||
|
|
|
@ -451,7 +451,7 @@ TORRENT_TEST(torrent_status)
|
|||
TEST_EQUAL(static_cast<int>(torrent_status::error_file_exception), -5);
|
||||
}
|
||||
|
||||
TORRENT_TEST(queue)
|
||||
void test_queue(add_torrent_params p)
|
||||
{
|
||||
lt::settings_pack pack = settings();
|
||||
// we're not testing the hash check, just accept the data we write
|
||||
|
@ -469,7 +469,7 @@ TORRENT_TEST(queue)
|
|||
|
||||
std::vector<char> buf;
|
||||
bencode(std::back_inserter(buf), t.generate());
|
||||
std::shared_ptr<torrent_info> ti = std::make_shared<torrent_info>(&buf[0], int(buf.size()));
|
||||
auto ti = std::make_shared<torrent_info>(buf.data(), int(buf.size()));
|
||||
add_torrent_params p;
|
||||
p.ti = ti;
|
||||
p.save_path = ".";
|
||||
|
@ -557,6 +557,19 @@ TORRENT_TEST(queue)
|
|||
TEST_EQUAL(torrents[3].queue_position(), 4);
|
||||
}
|
||||
|
||||
TORRENT_TEST(queue)
|
||||
{
|
||||
test_queue(add_torrent_params());
|
||||
}
|
||||
|
||||
TORRENT_TEST(queue_paused)
|
||||
{
|
||||
add_torrent_params p;
|
||||
p.flags |= add_torrent_params::flag_paused;
|
||||
p.flags &= ~add_torrent_params::flag_auto_managed;
|
||||
test_queue(p);
|
||||
}
|
||||
|
||||
TORRENT_TEST(test_move_storage_no_metadata)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
|
|
Loading…
Reference in New Issue