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());