From ca20d2d60088125966feb695f745fe1691f6aa6d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 31 Jan 2010 20:22:35 +0000 Subject: [PATCH] fixed broken build --- include/libtorrent/peer_connection.hpp | 1 + src/disk_io_thread.cpp | 2 -- src/peer_connection.cpp | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index 8824fef2e..a65addca6 100644 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -660,6 +660,7 @@ namespace libtorrent private: + std::pair preferred_caching() const; void fill_send_buffer(); void on_disk_read_complete(int ret, disk_io_job const& j, peer_request r); void on_disk_write_complete(int ret, disk_io_job const& j diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 191a55fe8..3913ccf56 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -438,8 +438,6 @@ namespace libtorrent cache_lru_index_t& ridx = m_read_pieces.get<1>(); i = ridx.begin(); while (i != ridx.end() && now - i->expire > cut_off) - { - free_piece(const_cast(*i), l); { free_piece(const_cast(*i), l); ridx.erase(i++); diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 0cfc82a23..fefaa8a79 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -3852,6 +3852,7 @@ namespace libtorrent int expiry = 0; if (m_ses.m_settings.guided_read_cache) { + boost::shared_ptr t = m_torrent.lock(); int upload_rate = m_statistics.upload_payload_rate(); if (upload_rate == 0) upload_rate = 1; @@ -3874,7 +3875,7 @@ namespace libtorrent line_size = cache_size; } - return std::make_pai(line_size, expiry); + return std::make_pair(line_size, expiry); } void peer_connection::fill_send_buffer()