From 053dec6e9ee9b30729c738df9184b9841310740c Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 3 Aug 2007 18:05:17 +0000 Subject: [PATCH] libtorrent sync 1429 --- libtorrent/src/peer_connection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp index 8666e4236..b73e32896 100755 --- a/libtorrent/src/peer_connection.cpp +++ b/libtorrent/src/peer_connection.cpp @@ -938,7 +938,8 @@ namespace libtorrent && r.start < t->torrent_file().piece_size(r.piece) && r.length > 0 && r.length + r.start <= t->torrent_file().piece_size(r.piece) - && m_peer_interested) + && m_peer_interested + && r.length <= t->block_size()) { #ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << time_now_string() @@ -963,7 +964,8 @@ namespace libtorrent "i: " << m_peer_interested << " | " "t: " << (int)t->torrent_file().piece_size(r.piece) << " | " "n: " << t->torrent_file().num_pieces() << " | " - "h: " << t->have_piece(r.piece) << " ]\n"; + "h: " << t->have_piece(r.piece) << " | " + "block_limit: " << t->block_size() << " ]\n"; #endif ++m_num_invalid_requests;