From 413c72d0aa31384e9551aba5fb0061df33e786a4 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Wed, 1 Aug 2007 20:19:54 +0000 Subject: [PATCH] libtorrent sync 1423 --- libtorrent/src/peer_connection.cpp | 7 ++----- libtorrent/src/torrent.cpp | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp index 48018aa8f..a0c4cc21c 100755 --- a/libtorrent/src/peer_connection.cpp +++ b/libtorrent/src/peer_connection.cpp @@ -2178,7 +2178,7 @@ namespace libtorrent if (!m_ignore_bandwidth_limits && max_receive > quota_left) max_receive = quota_left; - assert(max_receive > 0); + if (max_receive == 0) return; assert(m_recv_pos >= 0); assert(m_packet_size > 0); @@ -2276,10 +2276,7 @@ namespace libtorrent m_recv_pos += bytes_transferred; assert(m_recv_pos <= int(m_recv_buffer.size())); - { - INVARIANT_CHECK; - on_receive(error, bytes_transferred); - } + on_receive(error, bytes_transferred); assert(m_packet_size > 0); diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index 9d83cc6d9..1b23ca8f5 100755 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -2330,15 +2330,11 @@ namespace libtorrent torrent_handle torrent::get_handle() const { - INVARIANT_CHECK; - return torrent_handle(&m_ses, &m_checker, m_torrent_file.info_hash()); } session_settings const& torrent::settings() const { -// INVARIANT_CHECK; - return m_ses.settings(); }