merged RC_1_1 into master
This commit is contained in:
commit
9463159e67
|
@ -91,6 +91,8 @@
|
|||
* resume data no longer has timestamps of files
|
||||
* require C++11 to build libtorrent
|
||||
|
||||
* fix python binding for torrent_info::creation_date()
|
||||
|
||||
1.1.10 release
|
||||
|
||||
* fix issue in udp_socket with unusual socket failure
|
||||
|
|
|
@ -146,5 +146,6 @@ void bind_datetime()
|
|||
, chrono_duration_to_python<std::chrono::seconds>>();
|
||||
|
||||
optional_to_python<boost::posix_time::ptime>();
|
||||
optional_to_python<std::time_t>();
|
||||
}
|
||||
|
||||
|
|
|
@ -297,6 +297,7 @@ class test_torrent_info(unittest.TestCase):
|
|||
self.assertEqual(f.file_name(0), 'test_torrent')
|
||||
self.assertEqual(f.file_size(0), 1234)
|
||||
self.assertEqual(info.total_size(), 1234)
|
||||
self.assertEqual(info.creation_date(), 0)
|
||||
|
||||
def test_metadata(self):
|
||||
ti = lt.torrent_info('base.torrent')
|
||||
|
|
|
@ -247,6 +247,18 @@ namespace {
|
|||
, default_pred, flags);
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct disk_aborter
|
||||
{
|
||||
explicit disk_aborter(disk_io_thread& dio) : m_dio(dio) {}
|
||||
~disk_aborter() { m_dio.abort(true); }
|
||||
disk_aborter(disk_aborter const&) = delete;
|
||||
disk_aborter& operator=(disk_aborter const&) = delete;
|
||||
private:
|
||||
disk_io_thread& m_dio;
|
||||
};
|
||||
}
|
||||
|
||||
void set_piece_hashes(create_torrent& t, std::string const& p
|
||||
, std::function<void(piece_index_t)> const& f, error_code& ec)
|
||||
{
|
||||
|
@ -279,6 +291,7 @@ namespace {
|
|||
|
||||
counters cnt;
|
||||
disk_io_thread disk_thread(ios, cnt);
|
||||
disk_aborter da(disk_thread);
|
||||
|
||||
aux::vector<download_priority_t, file_index_t> priorities;
|
||||
sha1_hash info_hash;
|
||||
|
@ -320,7 +333,6 @@ namespace {
|
|||
#else
|
||||
ios.run(ec);
|
||||
#endif
|
||||
disk_thread.abort(true);
|
||||
}
|
||||
|
||||
create_torrent::~create_torrent() = default;
|
||||
|
|
Loading…
Reference in New Issue