forked from premiere/premiere-libtorrent
resume data alerts are always posted, regardless of alert mask
This commit is contained in:
parent
57995668fe
commit
7e430d5a2a
|
@ -75,6 +75,7 @@
|
||||||
release 0.14.7
|
release 0.14.7
|
||||||
|
|
||||||
* fixed deadlock in natpmp
|
* fixed deadlock in natpmp
|
||||||
|
* resume data alerts are always posted, regardless of alert mask
|
||||||
|
|
||||||
release 0.14.6
|
release 0.14.6
|
||||||
|
|
||||||
|
|
|
@ -934,6 +934,9 @@ can be called and it can pop the alert independently.
|
||||||
If this limit is reached, new incoming alerts can not be received until alerts are popped
|
If this limit is reached, new incoming alerts can not be received until alerts are popped
|
||||||
by calling ``pop_alert``. Default value is 1000.
|
by calling ``pop_alert``. Default value is 1000.
|
||||||
|
|
||||||
|
``save_resume_data_alert`` and ``save_resume_data_failed_alert`` are always posted, regardelss
|
||||||
|
of the alert mask.
|
||||||
|
|
||||||
add_extension()
|
add_extension()
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
|
@ -2331,13 +2331,11 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||||
|
|
||||||
if (!j.resume_data && alerts().should_post<save_resume_data_failed_alert>())
|
if (!j.resume_data)
|
||||||
{
|
{
|
||||||
alerts().post_alert(save_resume_data_failed_alert(get_handle(), j.error));
|
alerts().post_alert(save_resume_data_failed_alert(get_handle(), j.error));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (j.resume_data && alerts().should_post<save_resume_data_alert>())
|
|
||||||
{
|
{
|
||||||
write_resume_data(*j.resume_data);
|
write_resume_data(*j.resume_data);
|
||||||
alerts().post_alert(save_resume_data_alert(j.resume_data
|
alerts().post_alert(save_resume_data_alert(j.resume_data
|
||||||
|
@ -4933,11 +4931,8 @@ namespace libtorrent
|
||||||
|
|
||||||
if (!m_owning_storage.get())
|
if (!m_owning_storage.get())
|
||||||
{
|
{
|
||||||
if (alerts().should_post<save_resume_data_failed_alert>())
|
alerts().post_alert(save_resume_data_failed_alert(get_handle()
|
||||||
{
|
, error_code(errors::destructing_torrent, libtorrent_category)));
|
||||||
alerts().post_alert(save_resume_data_failed_alert(get_handle()
|
|
||||||
, error_code(errors::destructing_torrent, libtorrent_category)));
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4946,13 +4941,10 @@ namespace libtorrent
|
||||||
|| m_state == torrent_status::checking_files
|
|| m_state == torrent_status::checking_files
|
||||||
|| m_state == torrent_status::checking_resume_data)
|
|| m_state == torrent_status::checking_resume_data)
|
||||||
{
|
{
|
||||||
if (alerts().should_post<save_resume_data_alert>())
|
boost::shared_ptr<entry> rd(new entry);
|
||||||
{
|
write_resume_data(*rd);
|
||||||
boost::shared_ptr<entry> rd(new entry);
|
alerts().post_alert(save_resume_data_alert(rd
|
||||||
write_resume_data(*rd);
|
, get_handle()));
|
||||||
alerts().post_alert(save_resume_data_alert(rd
|
|
||||||
, get_handle()));
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_storage->async_save_resume_data(
|
m_storage->async_save_resume_data(
|
||||||
|
|
Loading…
Reference in New Issue