From 06bf225237c134d2b21f6bd306fbdd78256d2575 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 26 May 2015 20:09:19 +0000 Subject: [PATCH] fix release build and tune want_tick --- include/libtorrent/kademlia/node.hpp | 4 ++-- include/libtorrent/kademlia/routing_table.hpp | 4 ++-- src/session_impl.cpp | 2 +- src/torrent.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/libtorrent/kademlia/node.hpp b/include/libtorrent/kademlia/node.hpp index 1b46dcd27..75791856e 100644 --- a/include/libtorrent/kademlia/node.hpp +++ b/include/libtorrent/kademlia/node.hpp @@ -232,7 +232,7 @@ public: int data_size() const { return int(m_map.size()); } -#ifndef TORRENT_DISABLE_LOGGING +#if defined TORRENT_DEBUG void print_state(std::ostream& os) const { m_table.print_state(os); } #endif @@ -248,7 +248,7 @@ public: , udp::endpoint const& addr); std::string generate_token(udp::endpoint const& addr, char const* info_hash); - + // the returned time is the delay until connection_timeout() // should be called again the next time time_duration connection_timeout(); diff --git a/include/libtorrent/kademlia/routing_table.hpp b/include/libtorrent/kademlia/routing_table.hpp index 8d00952af..54fa2e505 100644 --- a/include/libtorrent/kademlia/routing_table.hpp +++ b/include/libtorrent/kademlia/routing_table.hpp @@ -170,9 +170,9 @@ public: // i.e. essentially the number of full buckets // we have int depth() const; - + int num_active_buckets() const { return m_buckets.size(); } - + void replacement_cache(bucket_t& nodes) const; #if defined TORRENT_DEBUG diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 641688eec..2f6534273 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -5909,7 +5909,7 @@ retry: { if (m_pending_auto_manage || m_abort) return; - // we we recalculated auto-managed torrents less than a second ago, + // we recalculated auto-managed torrents less than a second ago, // put it off one second. if (time_now() - m_last_auto_manage < seconds(1)) { diff --git a/src/torrent.cpp b/src/torrent.cpp index 0024f1fb1..93f75255b 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -7872,7 +7872,7 @@ namespace libtorrent return true; // if we don't get ticks we won't become inactive - if (!m_inactive) return true; + if (m_allow_peers && !m_inactive) return true; return false; }