lt bug fixes #1502 and #1500

This commit is contained in:
Marcos Pinto 2007-08-25 22:43:36 +00:00
parent 441c4de1e3
commit d071961473
3 changed files with 3 additions and 0 deletions

View File

@ -341,6 +341,7 @@ private:
{ {
assert(amount == limit - m_current_quota); assert(amount == limit - m_current_quota);
bw_queue_entry<PeerConnection> qe = m_queue.front(); bw_queue_entry<PeerConnection> qe = m_queue.front();
assert(qe.max_block_size > 0);
m_queue.pop_front(); m_queue.pop_front();
shared_ptr<Torrent> t = qe.peer->associated_torrent().lock(); shared_ptr<Torrent> t = qe.peer->associated_torrent().lock();

View File

@ -189,6 +189,7 @@ namespace libtorrent
, m_download_limit(bandwidth_limit::inf) , m_download_limit(bandwidth_limit::inf)
, m_peer_info(peerinfo) , m_peer_info(peerinfo)
, m_speed(slow) , m_speed(slow)
, m_connection_ticket(-1)
, m_remote_bytes_dled(0) , m_remote_bytes_dled(0)
, m_remote_dl_rate(0) , m_remote_dl_rate(0)
, m_remote_dl_update(time_now()) , m_remote_dl_update(time_now())

View File

@ -645,6 +645,7 @@ namespace libtorrent
if (j->finished + j->writing >= complete) return; if (j->finished + j->writing >= complete) return;
using std::swap; using std::swap;
swap(*j, *i); swap(*j, *i);
if (j == m_downloads.begin()) break;
} }
} }