From ac0921599d1bc0c3f96aa5fa027158de19250891 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 17 Dec 2003 21:21:09 +0000 Subject: [PATCH] *** empty log message *** --- docs/index.rst | 2 ++ src/peer_connection.cpp | 6 +++++- src/policy.cpp | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index d6f0d6b53..c15b71bcc 100755 --- a/docs/index.rst +++ b/docs/index.rst @@ -1052,6 +1052,8 @@ Written by Arvid Norberg and Daniel Wallin. Copyright (c) 2003 Contributions by Magnus Jonsson +Thanks to Reimond Retz for bugfixes, suggestions and testing + Project is hosted by sourceforge. |sf_logo|__ diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 74d8c27d5..25e208356 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -342,6 +342,9 @@ bool libtorrent::peer_connection::dispatch_message(int received) m_statistics.received_bytes(0, received); if (m_recv_pos < m_packet_size) return false; + // clear the request queue if the client isn't interested + m_requests.clear(); + #ifndef NDEBUG (*m_logger) << m_socket->sender().as_string() << " <== NOT_INTERESTED\n"; #endif @@ -468,7 +471,8 @@ bool libtorrent::peer_connection::dispatch_message(int received) && r.start < m_torrent->torrent_file().piece_size(r.piece) && r.length > 0 && r.length + r.start < m_torrent->torrent_file().piece_size(r.piece) - && !m_choked) + && !m_choked + && m_peer_interested) { m_requests.push_back(r); send_buffer_updated(); diff --git a/src/policy.cpp b/src/policy.cpp index 0a5e42680..3a7776818 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -568,7 +568,6 @@ namespace libtorrent // called when a peer is no longer interested in us void policy::not_interested(peer_connection& c) { - c.not_interested(); } bool policy::unchoke_one_peer()