merged RC_1_1 into master
This commit is contained in:
commit
3b0ce8d2e1
|
@ -84,6 +84,7 @@
|
||||||
* 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
|
||||||
|
|
||||||
|
* set the hidden attribute when creating the part file
|
||||||
* fix recent regression with force_proxy setting
|
* fix recent regression with force_proxy setting
|
||||||
* don't perform DNS lookups for the DHT bootstrap unless DHT is enabled
|
* don't perform DNS lookups for the DHT bootstrap unless DHT is enabled
|
||||||
* fix issue where setting file/piece priority would stop checking
|
* fix issue where setting file/piece priority would stop checking
|
||||||
|
|
|
@ -1642,7 +1642,7 @@ TORRENT_VERSION_NAMESPACE_2
|
||||||
, torrent_handle const& h, error_code const& ec, string_view file
|
, torrent_handle const& h, error_code const& ec, string_view file
|
||||||
, operation_t op);
|
, operation_t op);
|
||||||
|
|
||||||
TORRENT_DEFINE_ALERT(fastresume_rejected_alert, 53)
|
TORRENT_DEFINE_ALERT_PRIO(fastresume_rejected_alert, 53, alert_priority_critical)
|
||||||
|
|
||||||
static constexpr alert_category_t static_category = alert::status_notification
|
static constexpr alert_category_t static_category = alert::status_notification
|
||||||
| alert::error_notification;
|
| alert::error_notification;
|
||||||
|
|
|
@ -530,14 +530,14 @@ static_assert(!(open_mode::sparse & open_mode::attribute_mask), "internal flags
|
||||||
|
|
||||||
TORRENT_ASSERT(static_cast<std::uint32_t>(mode & open_mode::rw_mask) < mode_array.size());
|
TORRENT_ASSERT(static_cast<std::uint32_t>(mode & open_mode::rw_mask) < mode_array.size());
|
||||||
win_open_mode_t const& m = mode_array[static_cast<std::uint32_t>(mode & open_mode::rw_mask)];
|
win_open_mode_t const& m = mode_array[static_cast<std::uint32_t>(mode & open_mode::rw_mask)];
|
||||||
DWORD a = attrib_array[static_cast<std::uint32_t>(mode & open_mode::attribute_mask) >> 12];
|
DWORD a = attrib_array[static_cast<std::uint32_t>(mode & open_mode::attribute_mask) >> 7];
|
||||||
|
|
||||||
// one might think it's a good idea to pass in FILE_FLAG_RANDOM_ACCESS. It
|
// one might think it's a good idea to pass in FILE_FLAG_RANDOM_ACCESS. It
|
||||||
// turns out that it isn't. That flag will break your operating system:
|
// turns out that it isn't. That flag will break your operating system:
|
||||||
// http://support.microsoft.com/kb/2549369
|
// http://support.microsoft.com/kb/2549369
|
||||||
|
|
||||||
DWORD const flags = ((mode & open_mode::random_access) ? 0 : FILE_FLAG_SEQUENTIAL_SCAN)
|
DWORD const flags = ((mode & open_mode::random_access) ? 0 : FILE_FLAG_SEQUENTIAL_SCAN)
|
||||||
| (a ? a : FILE_ATTRIBUTE_NORMAL)
|
| a
|
||||||
| FILE_FLAG_OVERLAPPED
|
| FILE_FLAG_OVERLAPPED
|
||||||
| ((mode & open_mode::no_cache) ? FILE_FLAG_WRITE_THROUGH : 0);
|
| ((mode & open_mode::no_cache) ? FILE_FLAG_WRITE_THROUGH : 0);
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace libtorrent {
|
||||||
TORRENT_ASSERT(offset >= 0);
|
TORRENT_ASSERT(offset >= 0);
|
||||||
std::unique_lock<std::mutex> l(m_mutex);
|
std::unique_lock<std::mutex> l(m_mutex);
|
||||||
|
|
||||||
open_file(open_mode::read_write, ec);
|
open_file(open_mode::read_write | open_mode::attribute_hidden, ec);
|
||||||
if (ec) return -1;
|
if (ec) return -1;
|
||||||
|
|
||||||
auto const i = m_piece_map.find(piece);
|
auto const i = m_piece_map.find(piece);
|
||||||
|
@ -206,7 +206,7 @@ namespace libtorrent {
|
||||||
}
|
}
|
||||||
|
|
||||||
slot_index_t const slot = i->second;
|
slot_index_t const slot = i->second;
|
||||||
open_file(open_mode::read_write, ec);
|
open_file(open_mode::read_write | open_mode::attribute_hidden, ec);
|
||||||
if (ec) return -1;
|
if (ec) return -1;
|
||||||
|
|
||||||
l.unlock();
|
l.unlock();
|
||||||
|
@ -375,7 +375,7 @@ namespace libtorrent {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
open_file(open_mode::read_write, ec);
|
open_file(open_mode::read_write | open_mode::attribute_hidden, ec);
|
||||||
if (ec) return;
|
if (ec) return;
|
||||||
|
|
||||||
std::vector<char> header(static_cast<std::size_t>(m_header_size));
|
std::vector<char> header(static_cast<std::size_t>(m_header_size));
|
||||||
|
|
|
@ -160,11 +160,10 @@ namespace libtorrent {
|
||||||
{
|
{
|
||||||
// move stuff into the part file
|
// move stuff into the part file
|
||||||
// this is not implemented yet.
|
// this is not implemented yet.
|
||||||
// pretend that we didn't set the priority to 0.
|
// so we just don't use a partfile for this file
|
||||||
|
|
||||||
std::string fp = fs.file_path(i, m_save_path);
|
std::string const fp = fs.file_path(i, m_save_path);
|
||||||
if (exists(fp))
|
if (exists(fp)) use_partfile(i, false);
|
||||||
new_prio = low_priority;
|
|
||||||
/*
|
/*
|
||||||
file_handle f = open_file(i, open_mode::read_only, ec);
|
file_handle f = open_file(i, open_mode::read_only, ec);
|
||||||
if (ec.ec != boost::system::errc::no_such_file_or_directory)
|
if (ec.ec != boost::system::errc::no_such_file_or_directory)
|
||||||
|
|
|
@ -121,7 +121,7 @@ TORRENT_TEST(alerts_types)
|
||||||
TEST_ALERT_TYPE(portmap_error_alert, 50, 0, alert::port_mapping_notification | alert::error_notification);
|
TEST_ALERT_TYPE(portmap_error_alert, 50, 0, alert::port_mapping_notification | alert::error_notification);
|
||||||
TEST_ALERT_TYPE(portmap_alert, 51, 0, alert::port_mapping_notification);
|
TEST_ALERT_TYPE(portmap_alert, 51, 0, alert::port_mapping_notification);
|
||||||
TEST_ALERT_TYPE(portmap_log_alert, 52, 0, alert::port_mapping_log_notification);
|
TEST_ALERT_TYPE(portmap_log_alert, 52, 0, alert::port_mapping_log_notification);
|
||||||
TEST_ALERT_TYPE(fastresume_rejected_alert, 53, 0, alert::status_notification | alert::error_notification);
|
TEST_ALERT_TYPE(fastresume_rejected_alert, 53, 2, alert::status_notification | alert::error_notification);
|
||||||
TEST_ALERT_TYPE(peer_blocked_alert, 54, 0, alert::ip_block_notification);
|
TEST_ALERT_TYPE(peer_blocked_alert, 54, 0, alert::ip_block_notification);
|
||||||
TEST_ALERT_TYPE(dht_announce_alert, 55, 0, alert::dht_notification);
|
TEST_ALERT_TYPE(dht_announce_alert, 55, 0, alert::dht_notification);
|
||||||
TEST_ALERT_TYPE(dht_get_peers_alert, 56, 0, alert::dht_notification);
|
TEST_ALERT_TYPE(dht_get_peers_alert, 56, 0, alert::dht_notification);
|
||||||
|
|
Loading…
Reference in New Issue