mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-09 23:59:22 +00:00
* Reordered the ChunkList::sync_* code to work around a gcc-3.3 bug.
* torrent::TrackerList::send_completed() was being called before the download was resumed, thus it never got sent. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@692 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -405,16 +405,10 @@ DownloadList::hash_done(Download* download) {
|
|||||||
|
|
||||||
case Download::variable_hashing_last:
|
case Download::variable_hashing_last:
|
||||||
|
|
||||||
if (download->is_done()) {
|
if (download->is_done())
|
||||||
|
|
||||||
confirm_finished(download);
|
confirm_finished(download);
|
||||||
|
else
|
||||||
if (download->variable()->get_value("state") == 1)
|
|
||||||
resume(download);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
download->set_message("Hash check on download completion found bad chunks.");
|
download->set_message("Hash check on download completion found bad chunks.");
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -475,8 +469,6 @@ DownloadList::confirm_finished(Download* download) {
|
|||||||
download->set_connection_type(download->variable()->get_string("connection_seed"));
|
download->set_connection_type(download->variable()->get_string("connection_seed"));
|
||||||
download->set_priority(download->priority());
|
download->set_priority(download->priority());
|
||||||
|
|
||||||
download->download()->tracker_list().send_completed();
|
|
||||||
|
|
||||||
// Do this before the slots are called in case one of them closes
|
// Do this before the slots are called in case one of them closes
|
||||||
// the download.
|
// the download.
|
||||||
if (!download->is_active() && control->variable()->get_value("session_on_completion") == 1) {
|
if (!download->is_active() && control->variable()->get_value("session_on_completion") == 1) {
|
||||||
@@ -485,6 +477,11 @@ DownloadList::confirm_finished(Download* download) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::for_each(slot_map_finished().begin(), slot_map_finished().end(), download_list_call(download));
|
std::for_each(slot_map_finished().begin(), slot_map_finished().end(), download_list_call(download));
|
||||||
|
|
||||||
|
if (!download->is_active() && download->variable()->get_value("state") == 1)
|
||||||
|
resume(download);
|
||||||
|
|
||||||
|
download->download()->tracker_list().send_completed();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user