mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 12:42:31 +00:00
* Clear the DelegatorChunk's when clearing Delegator, so it doesn't
throw on some obscure bug. Not going to be looking for this one anyway as there is a rewrite scheduled. * Added "tos = default|lowdelay|throughput|reliability|mincost" option. * Made EntryList::value_type a pointer, fixed so FileMeta is initialized and path set before Download::open(). git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@662 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+8
-6
@@ -43,6 +43,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <rak/address_info.h>
|
||||
#include <rak/error_number.h>
|
||||
#include <rak/regex.h>
|
||||
#include <rak/string_manip.h>
|
||||
#include <sigc++/bind.h>
|
||||
@@ -226,15 +227,16 @@ Manager::listen_open() {
|
||||
if (control->variable()->get("port_random").as_string() == "yes") {
|
||||
int boundary = m_portFirst + random() % (m_portLast - m_portFirst + 1);
|
||||
|
||||
if (!torrent::connection_manager()->listen_open(boundary, m_portLast) &&
|
||||
!torrent::connection_manager()->listen_open(m_portFirst, boundary))
|
||||
throw torrent::input_error("Could not open/bind a port for listening.");
|
||||
if (torrent::connection_manager()->listen_open(boundary, m_portLast) ||
|
||||
torrent::connection_manager()->listen_open(m_portFirst, boundary))
|
||||
return;
|
||||
|
||||
} else {
|
||||
if (!torrent::connection_manager()->listen_open(m_portFirst, m_portLast))
|
||||
throw torrent::input_error("Could not open/bind a port for listening.");
|
||||
|
||||
if (torrent::connection_manager()->listen_open(m_portFirst, m_portLast))
|
||||
return;
|
||||
}
|
||||
|
||||
throw torrent::input_error("Could not open/bind a port for listening: " + std::string(rak::error_number::current().c_str()));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user