mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 14:42:30 +00:00
* Clear the download rate when finishing a torrent.
* Fixed torrent::set_{bind,local}_address(...) so they update
correctly.
* Tweaked the time left display, show minutes instead of seconds.
* Add earlier check on validity of the socket address of
incoming/outgoing connection.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@610 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+3
-3
@@ -245,18 +245,18 @@ Manager::receive_download_done(Download* d) {
|
||||
void
|
||||
Manager::listen_open() {
|
||||
if (m_portFirst > m_portLast)
|
||||
throw std::runtime_error("Invalid port range for listening");
|
||||
throw torrent::input_error("Invalid port range for listening");
|
||||
|
||||
if (m_portRandom) {
|
||||
int boundary = m_portFirst + random() % (m_portLast - m_portFirst + 1);
|
||||
|
||||
if (!torrent::listen_open(boundary, m_portLast) &&
|
||||
!torrent::listen_open(m_portFirst, boundary))
|
||||
throw std::runtime_error("Could not open port for listening.");
|
||||
throw torrent::input_error("Could not open/bind a port for listening.");
|
||||
|
||||
} else {
|
||||
if (!torrent::listen_open(m_portFirst, m_portLast))
|
||||
throw std::runtime_error("Could not open port for listening.");
|
||||
throw torrent::input_error("Could not open/bind a port for listening.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -79,6 +79,8 @@ public:
|
||||
void initialize_second();
|
||||
void cleanup();
|
||||
|
||||
void listen_open();
|
||||
|
||||
void shutdown(bool force);
|
||||
|
||||
DListItr insert(std::istream* s);
|
||||
@@ -92,8 +94,6 @@ public:
|
||||
void push_log(const std::string& msg) { m_logImportant.push_front(msg); m_logComplete.push_front(msg); }
|
||||
|
||||
private:
|
||||
void listen_open();
|
||||
|
||||
void create_http(const std::string& uri);
|
||||
void create_final(std::istream* s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user