make files deleted alert non-discardable

This commit is contained in:
Arvid Norberg 2012-12-23 07:01:50 +00:00
parent 806b7c85eb
commit e2d14078ec
3 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,4 @@
* make files deleted alert non-discardable
* make built-in sha functions not conflict with libcrypto
* improve web seed hash failure case
* improve DHT lookup times

View File

@ -713,6 +713,7 @@ namespace libtorrent
const static int static_category = alert::storage_notification;
virtual std::string message() const
{ return torrent_alert::message() + " deleted"; }
virtual bool discardable() const { return false; }
sha1_hash info_hash;
};
@ -737,6 +738,7 @@ namespace libtorrent
return torrent_alert::message() + " torrent deletion failed: "
+ error.message();
}
virtual bool discardable() const { return false; }
error_code error;

View File

@ -3591,13 +3591,11 @@ namespace libtorrent
if (ret != 0)
{
if (alerts().should_post<torrent_delete_failed_alert>())
alerts().post_alert(torrent_delete_failed_alert(get_handle(), j.error));
alerts().post_alert(torrent_delete_failed_alert(get_handle(), j.error));
}
else
{
if (alerts().should_post<torrent_deleted_alert>())
alerts().post_alert(torrent_deleted_alert(get_handle(), m_torrent_file->info_hash()));
alerts().post_alert(torrent_deleted_alert(get_handle(), m_torrent_file->info_hash()));
}
}