mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 20:52:30 +00:00
* 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:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user