From c0ffdc51c7461dbdb4fce2666aca91260c9d9b47 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 25 Aug 2007 05:09:25 +0000 Subject: [PATCH] piece picker fix and bandwidth_limiter typo fix --- include/libtorrent/bandwidth_manager.hpp | 2 +- src/piece_picker.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/bandwidth_manager.hpp b/include/libtorrent/bandwidth_manager.hpp index fcc6a31cb..d3d4ff190 100644 --- a/include/libtorrent/bandwidth_manager.hpp +++ b/include/libtorrent/bandwidth_manager.hpp @@ -341,7 +341,7 @@ private: { assert(amount == limit - m_current_quota); bw_queue_entry qe = m_queue.front(); - assert(qe.max_bock_size > 0); + assert(qe.max_block_size > 0); m_queue.pop_front(); shared_ptr t = qe.peer->associated_torrent().lock(); diff --git a/src/piece_picker.cpp b/src/piece_picker.cpp index 8eb79b149..82d740e96 100755 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -645,6 +645,7 @@ namespace libtorrent if (j->finished + j->writing >= complete) return; using std::swap; swap(*j, *i); + if (j == m_downloads.begin()) break; } }