mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-15 13:46:17 +00:00
Removed deprecated signals for chunks passed/failed.
This commit is contained in:
@@ -59,13 +59,11 @@ Download::Download(download_type d) :
|
|||||||
m_download(d),
|
m_download(d),
|
||||||
m_hashFailed(false),
|
m_hashFailed(false),
|
||||||
|
|
||||||
m_chunksFailed(0),
|
|
||||||
m_resumeFlags(~uint32_t()),
|
m_resumeFlags(~uint32_t()),
|
||||||
m_group(0) {
|
m_group(0) {
|
||||||
|
|
||||||
m_download.info()->signal_tracker_success().push_back(tr1::bind(&Download::receive_tracker_msg, this, ""));
|
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_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() {
|
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();
|
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
|
void
|
||||||
Download::set_throttle_name(const std::string& throttleName) {
|
Download::set_throttle_name(const std::string& throttleName) {
|
||||||
if (m_download.info()->is_active())
|
if (m_download.info()->is_active())
|
||||||
|
|||||||
@@ -113,8 +113,6 @@ public:
|
|||||||
const std::string& message() const { return m_message; }
|
const std::string& message() const { return m_message; }
|
||||||
void set_message(const std::string& msg) { m_message = msg; }
|
void set_message(const std::string& msg) { m_message = msg; }
|
||||||
|
|
||||||
uint32_t chunks_failed() const { return m_chunksFailed; }
|
|
||||||
|
|
||||||
void enable_udp_trackers(bool state);
|
void enable_udp_trackers(bool state);
|
||||||
|
|
||||||
uint32_t priority();
|
uint32_t priority();
|
||||||
@@ -145,14 +143,9 @@ private:
|
|||||||
|
|
||||||
// Store the FileList instance so we can use slots etc on it.
|
// Store the FileList instance so we can use slots etc on it.
|
||||||
download_type m_download;
|
download_type m_download;
|
||||||
|
|
||||||
bool m_hashFailed;
|
bool m_hashFailed;
|
||||||
|
|
||||||
std::string m_message;
|
std::string m_message;
|
||||||
uint32_t m_chunksFailed;
|
|
||||||
|
|
||||||
uint32_t m_resumeFlags;
|
uint32_t m_resumeFlags;
|
||||||
|
|
||||||
unsigned int m_group;
|
unsigned int m_group;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <torrent/rate.h>
|
#include <torrent/rate.h>
|
||||||
|
#include <torrent/data/transfer_list.h>
|
||||||
#include <torrent/tracker_controller.h>
|
#include <torrent/tracker_controller.h>
|
||||||
#include <torrent/tracker_list.h>
|
#include <torrent/tracker_list.h>
|
||||||
#include <torrent/peer/connection_list.h>
|
#include <torrent/peer/connection_list.h>
|
||||||
@@ -83,7 +84,7 @@ WindowDownloadStatusbar::redraw() {
|
|||||||
(int)m_download->download()->peers_accounted(),
|
(int)m_download->download()->peers_accounted(),
|
||||||
(int)m_download->info()->upload_unchoked(),
|
(int)m_download->info()->upload_unchoked(),
|
||||||
(int)m_download->info()->download_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);
|
m_canvas->print(0, 1, "%s", buffer);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user