* Checked and fixed calls to priority_queue_insert to make sure they

don't end up in an infinite loop.

* Fixed a bug that caused failed chunk downloads to result in
ChunkSelector's forgetting to download them again.

* Added note to the man page about the schedule and schedule_remove
setting.

* Display the number of failed chunks in the client.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@612 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-12-20 19:12:15 +00:00
parent 3989ae8975
commit 2c5151def5
6 changed files with 48 additions and 4 deletions
+8
View File
@@ -47,6 +47,7 @@
namespace core {
Download::Download() :
m_chunksFailed(0),
m_connectionLeech(torrent::Download::CONNECTION_LEECH),
m_connectionSeed(torrent::Download::CONNECTION_SEED) {
}
@@ -71,6 +72,8 @@ Download::set_download(torrent::Download d) {
m_connTrackerSucceded = m_download.signal_tracker_succeded(sigc::bind(sigc::mem_fun(*this, &Download::receive_tracker_msg), ""));
m_connTrackerFailed = m_download.signal_tracker_failed(sigc::mem_fun(*this, &Download::receive_tracker_msg));
m_connStorageError = m_download.signal_storage_error(sigc::mem_fun(*this, &Download::receive_storage_error));
m_download.signal_chunk_failed(sigc::mem_fun(*this, &Download::receive_chunk_failed));
}
void
@@ -144,4 +147,9 @@ Download::connection_type_to_string(torrent::Download::ConnectionType t) {
}
}
void
Download::receive_chunk_failed(uint32_t idx) {
m_chunksFailed++;
}
}
+5
View File
@@ -65,6 +65,8 @@ public:
const std::string& get_message() { return m_message; }
uint32_t chunks_failed() const { return m_chunksFailed; }
void set_root_directory(const std::string& d);
ConnType get_connection_current() const { return m_download.connection_type(); }
@@ -95,9 +97,12 @@ private:
void receive_tracker_msg(std::string msg);
void receive_storage_error(std::string msg);
void receive_chunk_failed(uint32_t idx);
torrent::Download m_download;
std::string m_message;
uint32_t m_chunksFailed;
ConnType m_connectionLeech;
ConnType m_connectionSeed;