diff --git a/src/core/download.cc b/src/core/download.cc index 3d2a3634..01f2f2f8 100644 --- a/src/core/download.cc +++ b/src/core/download.cc @@ -59,13 +59,11 @@ Download::Download(download_type d) : m_download(d), m_hashFailed(false), - m_chunksFailed(0), m_resumeFlags(~uint32_t()), m_group(0) { m_download.info()->signal_tracker_success().push_back(tr1::bind(&Download::receive_tracker_msg, this, "")); m_download.info()->signal_tracker_failed().push_back(tr1::bind(&Download::receive_tracker_msg, this, tr1::placeholders::_1)); - m_download.info()->signal_chunk_failed().push_back(tr1::bind(&Download::receive_chunk_failed, this, tr1::placeholders::_1)); } Download::~Download() { @@ -141,11 +139,6 @@ Download::distributed_copies() const { return minAvail + 1 - bitfield->is_all_set() - (float)num / m_download.file_list()->size_chunks(); } -void -Download::receive_chunk_failed(__UNUSED uint32_t idx) { - m_chunksFailed++; -} - void Download::set_throttle_name(const std::string& throttleName) { if (m_download.info()->is_active()) diff --git a/src/core/download.h b/src/core/download.h index bf4999c9..0239c944 100644 --- a/src/core/download.h +++ b/src/core/download.h @@ -113,8 +113,6 @@ public: const std::string& message() const { return m_message; } void set_message(const std::string& msg) { m_message = msg; } - uint32_t chunks_failed() const { return m_chunksFailed; } - void enable_udp_trackers(bool state); uint32_t priority(); @@ -145,14 +143,9 @@ private: // Store the FileList instance so we can use slots etc on it. download_type m_download; - bool m_hashFailed; - std::string m_message; - uint32_t m_chunksFailed; - uint32_t m_resumeFlags; - unsigned int m_group; }; diff --git a/src/display/window_download_statusbar.cc b/src/display/window_download_statusbar.cc index 9c3deaab..bbf0379f 100644 --- a/src/display/window_download_statusbar.cc +++ b/src/display/window_download_statusbar.cc @@ -37,6 +37,7 @@ #include "config.h" #include +#include #include #include #include @@ -83,7 +84,7 @@ WindowDownloadStatusbar::redraw() { (int)m_download->download()->peers_accounted(), (int)m_download->info()->upload_unchoked(), (int)m_download->info()->download_unchoked(), - (int)m_download->chunks_failed()); + (int)m_download->download()->transfer_list()->failed_count()); m_canvas->print(0, 1, "%s", buffer);