From 54d5222347e714f9d3c5643fc355dbd0058ae399 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 28 Nov 2013 08:44:31 +0000 Subject: [PATCH] deprecate announce_entry::will_announce --- examples/client_test.cpp | 1 - include/libtorrent/torrent_info.hpp | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 23cf27a8a..7db46223b 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -2300,7 +2300,6 @@ int main(int argc, char* argv[]) snprintf(str, sizeof(str), "%2d %-55s fails: %-3d (%-3d) %s %s %5d \"%s\" %s\n" , i->tier, i->url.c_str(), i->fails, i->fail_limit, i->verified?"OK ":"- " , i->updating?"updating" - :!i->will_announce(now)?"" :to_string(int(total_seconds(i->next_announce - now)), 8).c_str() , i->min_announce > now ? total_seconds(i->min_announce - now) : 0 , i->last_error ? i->last_error.message().c_str() : "" diff --git a/include/libtorrent/torrent_info.hpp b/include/libtorrent/torrent_info.hpp index 18c330843..5bf73684e 100644 --- a/include/libtorrent/torrent_info.hpp +++ b/include/libtorrent/torrent_info.hpp @@ -195,12 +195,16 @@ namespace libtorrent // This is called when the tracker announce fails. void failed(session_settings const& sett, int retry_interval = 0); - bool will_announce(ptime now) const +#ifndef TORRENT_NO_DEPRECATE + // deprecated in 1.0 + TORRENT_DEPRECATED_PREFIX + bool will_announce(ptime now) const TORRENT_DEPRECATED { return now <= next_announce && (fails < fail_limit || fail_limit == 0) && !updating; } +#endif // returns true if we can announec to this tracker now. // The current time is passed in as ``now``. The ``is_seed``