* File progress wasn't being updated as the index range iterator was

off by one.

* Removed ProtocolChunk, moved the functions to PeerConnectionBase,
remains to clean it up.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@546 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-08-27 15:44:56 +00:00
parent abbe4dd675
commit a28ed1c96b
2 changed files with 11 additions and 3 deletions
+9 -3
View File
@@ -53,9 +53,9 @@ Download::Download() :
void
Download::start() {
if (is_done())
m_download.set_connection_type(m_connectionSeed);
m_download.set_connection_type(string_to_connection_type(m_connectionSeed));
else
m_download.set_connection_type(m_connectionLeech);
m_download.set_connection_type(string_to_connection_type(m_connectionLeech));
m_download.start();
}
@@ -97,7 +97,7 @@ Download::release_download() {
void
Download::receive_finished() {
m_download.set_connection_type(m_connectionSeed);
m_download.set_connection_type(string_to_connection_type(m_connectionSeed));
}
void
@@ -113,4 +113,10 @@ Download::receive_storage_error(std::string msg) {
m_message = "Storage error: [" + msg + "]";
}
torrent::Download::ConnectionType
Download::string_to_connection_type(const std::string& name) {
// Return default if the name isn't found.
return torrent::Download::CONNECTION_DEFAULT;
}
}
+2
View File
@@ -86,6 +86,8 @@ private:
void receive_tracker_msg(std::string msg);
void receive_storage_error(std::string msg);
static torrent::Download::ConnectionType string_to_connection_type(const std::string& name);
torrent::Download m_download;
std::string m_message;