diff --git a/docs/manual.html b/docs/manual.html index 220e0a332..f49e96389 100755 --- a/docs/manual.html +++ b/docs/manual.html @@ -177,17 +177,11 @@ send have messages to peers that already has the piece. This saves bandwidth.
Functions that are yet to be implemented:
----
-- better identification of peers that send bad data
-- ip-filters
-- file-level priority
-
libtorrent is portable at least among windows, macosx, and other UNIX-systems. It uses Boost.Thread, +
libtorrent is portable at least among Windows, MacOSX and other UNIX-systems. It uses Boost.Thread, Boost.Filesystem, Boost.Date_time and various other boost libraries as well as zlib.
libtorrent has been successfully compiled and tested on:
diff --git a/docs/manual.rst b/docs/manual.rst index 2cd15798d..00bef9704 100755 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -50,6 +50,8 @@ The current state includes the following features: means it can resume a torrent downloaded by any client. * adjusts the length of the request queue depending on download rate. * supports the ``compact=1`` tracker parameter. + * selective downloading. The ability to select which parts of a torrent you + want to download. __ http://home.elp.rr.com/tur/multitracker-spec.txt .. _Azureus: http://azureus.sourceforge.net @@ -57,13 +59,7 @@ __ http://nolar.com/azureus/extended.htm __ udp_tracker_protocol.html -Functions that are yet to be implemented: - - * better identification of peers that send bad data - * ip-filters - * file-level priority - -libtorrent is portable at least among windows, macosx, and other UNIX-systems. It uses Boost.Thread, +libtorrent is portable at least among Windows, MacOSX and other UNIX-systems. It uses Boost.Thread, Boost.Filesystem, Boost.Date_time and various other boost libraries as well as zlib. libtorrent has been successfully compiled and tested on: diff --git a/src/identify_client.cpp b/src/identify_client.cpp index 3e41c6a6d..2c0878bce 100755 --- a/src/identify_client.cpp +++ b/src/identify_client.cpp @@ -64,7 +64,7 @@ namespace int decode_digit(char c) { if (std::isdigit(c)) return c - '0'; - return std::toupper(c) - 'A' + 10; + return unsigned(c) - 'A' + 10; } // takes a peer id and returns a valid boost::optional @@ -75,9 +75,9 @@ namespace { fingerprint ret("..", 0, 0, 0, 0); - if (id[0] != '-' || !std::isprint(id[1]) || !std::isprint(id[2]) - || !std::isalnum(id[3]) || !std::isalnum(id[4]) - || !std::isalnum(id[5]) || !std::isalnum(id[6]) + if (id[0] != '-' || !std::isprint(id[1]) || (id[2] < '0') + || (id[3] < '0') || (id[4] < '0') + || (id[5] < '0') || (id[6] < '0') || id[7] != '-') return boost::optional(); @@ -102,8 +102,8 @@ namespace if (std::equal(id.begin()+4, id.begin()+8, "----")) { - if (!std::isalnum(id[1]) || !std::isalnum(id[2]) - || !std::isalnum(id[3])) + if (!std::isalnum(id[1]) || (id[2] < '0') + || (id[3] < '0')) return boost::optional (); ret.major_version = decode_digit(id[1]); ret.minor_version = decode_digit(id[2]); diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index dc50563d8..81d7d7308 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2081,6 +2081,7 @@ namespace libtorrent m_statistics.received_bytes(0, received); if (m_recv_pos < m_packet_size) break; assert(m_recv_pos == m_packet_size); + assert(m_packet_size == 20); #ifdef TORRENT_VERBOSE_LOGGING { diff --git a/src/torrent.cpp b/src/torrent.cpp index 3e7205b9e..d82e27740 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -300,7 +300,7 @@ namespace libtorrent m_currently_trying_tracker = 0; m_duration = interval; - if (peer_list.empty()) + if (peer_list.empty() && !is_seed()) { // if the peer list is empty, we should contact the // tracker soon again to see if there are any peers