* Improved hash checking, it now stops a torrent if some chunk

mappings fail even though a file has been allocated.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@578 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-10-10 19:36:12 +00:00
parent 881f515d03
commit ad80247ba6
4 changed files with 15 additions and 8 deletions
+3 -3
View File
@@ -80,6 +80,9 @@ print_download_info(char* buf, unsigned int length, core::Download* d) {
char*
print_download_status(char* buf, unsigned int length, core::Download* d) {
if (!d->get_download().is_active())
buf += std::max(0, snprintf(buf, length, "Inactive: "));
if (d->get_download().is_hash_checking())
buf += std::max(0, snprintf(buf, length, "Checking hash"));
@@ -90,9 +93,6 @@ print_download_status(char* buf, unsigned int length, core::Download* d) {
d->get_download().get_tracker_focus(),
d->get_download().get_tracker(d->get_download().get_tracker_focus()).get_url().c_str()));
else if (!d->get_download().is_active())
buf += std::max(0, snprintf(buf, length, "Inactive"));
else if (!d->get_message().empty())
buf += std::max(0, snprintf(buf, length, "%s", d->get_message().c_str()));