From 3e7a6b03e5cd7e777b3fe1019bfddd76d354b431 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 21 Mar 2016 18:47:17 -0400 Subject: [PATCH] remove dead code in peer_connection --- include/libtorrent/peer_connection.hpp | 2 -- src/peer_connection.cpp | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index 7ce79c4b0..aee016017 100644 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -719,8 +719,6 @@ namespace libtorrent // start downloading payload again void on_disk(); - void on_allocate_disk_buffer(char* buffer, int buffer_size); - int num_reading_bytes() const { return m_reading_bytes; } enum sync_t { read_async, read_sync }; diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 5241744d6..4e4a22097 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -5701,21 +5701,6 @@ namespace libtorrent setup_receive(); } - void peer_connection::on_allocate_disk_buffer(char* buffer, int buffer_size) - { - TORRENT_ASSERT(is_single_thread()); - INVARIANT_CHECK; - - TORRENT_ASSERT(m_channel_state[download_channel] & peer_info::bw_disk); - - m_recv_buffer.assign_disk_buffer(buffer, buffer_size); - - m_counters.inc_stats_counter(counters::num_peers_down_disk, -1); - m_channel_state[download_channel] &= ~peer_info::bw_disk; - - setup_receive(); - } - void peer_connection::setup_receive() { TORRENT_ASSERT(is_single_thread());