merged RC_1_1 into master
This commit is contained in:
commit
1a66a8b285
|
@ -1234,7 +1234,7 @@ TORRENT_VERSION_NAMESPACE_2
|
||||||
file_error_alert(aux::stack_allocator& alloc, error_code const& ec
|
file_error_alert(aux::stack_allocator& alloc, error_code const& ec
|
||||||
, string_view file, operation_t op, torrent_handle const& h);
|
, string_view file, operation_t op, torrent_handle const& h);
|
||||||
|
|
||||||
TORRENT_DEFINE_ALERT(file_error_alert, 43)
|
TORRENT_DEFINE_ALERT_PRIO(file_error_alert, 43, alert_priority_high)
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -7524,24 +7524,6 @@ bool is_downloading_state(int const st)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we might be finished already, in which case we should
|
|
||||||
// not switch to downloading mode. If all files are
|
|
||||||
// filtered, we're finished when we start.
|
|
||||||
if (m_state != torrent_status::finished
|
|
||||||
&& m_state != torrent_status::seeding
|
|
||||||
&& !m_seed_mode)
|
|
||||||
{
|
|
||||||
set_state(torrent_status::downloading);
|
|
||||||
}
|
|
||||||
|
|
||||||
INVARIANT_CHECK;
|
|
||||||
|
|
||||||
if (m_ses.alerts().should_post<torrent_checked_alert>())
|
|
||||||
{
|
|
||||||
m_ses.alerts().emplace_alert<torrent_checked_alert>(
|
|
||||||
get_handle());
|
|
||||||
}
|
|
||||||
|
|
||||||
// calling pause will also trigger the auto managed
|
// calling pause will also trigger the auto managed
|
||||||
// recalculation
|
// recalculation
|
||||||
// if we just got here by downloading the metadata,
|
// if we just got here by downloading the metadata,
|
||||||
|
@ -7578,6 +7560,24 @@ bool is_downloading_state(int const st)
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we might be finished already, in which case we should
|
||||||
|
// not switch to downloading mode. If all files are
|
||||||
|
// filtered, we're finished when we start.
|
||||||
|
if (m_state != torrent_status::finished
|
||||||
|
&& m_state != torrent_status::seeding
|
||||||
|
&& !m_seed_mode)
|
||||||
|
{
|
||||||
|
set_state(torrent_status::downloading);
|
||||||
|
}
|
||||||
|
|
||||||
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
if (m_ses.alerts().should_post<torrent_checked_alert>())
|
||||||
|
{
|
||||||
|
m_ses.alerts().emplace_alert<torrent_checked_alert>(
|
||||||
|
get_handle());
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||||
for (auto& ext : m_extensions)
|
for (auto& ext : m_extensions)
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,7 +111,7 @@ TORRENT_TEST(alerts_types)
|
||||||
TEST_ALERT_TYPE(torrent_resumed_alert, 40, 1, alert::status_notification);
|
TEST_ALERT_TYPE(torrent_resumed_alert, 40, 1, alert::status_notification);
|
||||||
TEST_ALERT_TYPE(torrent_checked_alert, 41, 1, alert::status_notification);
|
TEST_ALERT_TYPE(torrent_checked_alert, 41, 1, alert::status_notification);
|
||||||
TEST_ALERT_TYPE(url_seed_alert, 42, 0, alert::peer_notification | alert::error_notification);
|
TEST_ALERT_TYPE(url_seed_alert, 42, 0, alert::peer_notification | alert::error_notification);
|
||||||
TEST_ALERT_TYPE(file_error_alert, 43, 0, alert::status_notification | alert::error_notification | alert::storage_notification);
|
TEST_ALERT_TYPE(file_error_alert, 43, 1, alert::status_notification | alert::error_notification | alert::storage_notification);
|
||||||
TEST_ALERT_TYPE(metadata_failed_alert, 44, 0, alert::error_notification);
|
TEST_ALERT_TYPE(metadata_failed_alert, 44, 0, alert::error_notification);
|
||||||
TEST_ALERT_TYPE(metadata_received_alert, 45, 0, alert::status_notification);
|
TEST_ALERT_TYPE(metadata_received_alert, 45, 0, alert::status_notification);
|
||||||
TEST_ALERT_TYPE(udp_error_alert, 46, 0, alert::error_notification);
|
TEST_ALERT_TYPE(udp_error_alert, 46, 0, alert::error_notification);
|
||||||
|
|
|
@ -122,7 +122,7 @@ void run_test(std::string const& url, int size, int status, int connected
|
||||||
|
|
||||||
std::shared_ptr<http_connection> h = std::make_shared<http_connection>(ios
|
std::shared_ptr<http_connection> h = std::make_shared<http_connection>(ios
|
||||||
, res, &::http_handler_test, true, 1024*1024, &::http_connect_handler_test);
|
, res, &::http_handler_test, true, 1024*1024, &::http_connect_handler_test);
|
||||||
h->get(url, seconds(1), 0, &ps, 5, "test/user-agent", boost::none, resolver_flags{}, auth);
|
h->get(url, seconds(5), 0, &ps, 5, "test/user-agent", boost::none, resolver_flags{}, auth);
|
||||||
ios.reset();
|
ios.reset();
|
||||||
error_code e;
|
error_code e;
|
||||||
ios.run(e);
|
ios.run(e);
|
||||||
|
|
Loading…
Reference in New Issue