* Added support for Linux's fallocate and Darwin's fcntl(...,F_PREALLOCATE,...) to preallocate files by default. The 'system.file_allocate' setting will now only be used to indicate you want posix_fallocate called, which may block while it zeros out the file manually.

* Added 'event.download.hash_failed' and 'event.download.hash_final_failed'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1130 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-02-14 01:20:20 +00:00
parent 8954393e52
commit 31abf85846
4 changed files with 88 additions and 8 deletions
+2 -2
View File
@@ -438,7 +438,7 @@ DownloadList::hash_done(Download* download) {
if (!download->is_hash_checked()) {
download->set_hash_failed(true);
rpc::commands.call_catch("event.download.hash_done", rpc::make_target(download), torrent::Object(), "Download event action failed: ");
rpc::commands.call_catch("event.download.hash_failed", rpc::make_target(download), torrent::Object(), "Download event action failed: ");
return;
}
@@ -484,6 +484,7 @@ DownloadList::hash_done(Download* download) {
} else {
download->set_message("Hash check on download completion found bad chunks, consider using \"safe_sync\".");
control->core()->push_log("Hash check on download completion found bad chunks, consider using \"safe_sync\".");
rpc::commands.call_catch("event.download.hash_final_failed", rpc::make_target(download), torrent::Object(), "Download event action failed: ");
}
break;
@@ -505,7 +506,6 @@ DownloadList::hash_queue(Download* download, int type) {
if (rpc::call_command_value("d.get_hashing", rpc::make_target(download)) != Download::variable_hashing_stopped)
throw torrent::internal_error("DownloadList::hash_queue(...) hashing already queued.");
// close_throw(download);
// HACK
if (download->is_open()) {
pause(download, torrent::Download::stop_skip_tracker);