From 2715ae475ce0ef97b15da9e42b37251183e918c4 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 19 Sep 2015 01:54:47 -0400 Subject: [PATCH] expose whether torrents are announcing to trackers, lsd and dht. these can be disabled by the queuing logic --- include/libtorrent/torrent_status.hpp | 8 ++++++++ src/torrent.cpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/include/libtorrent/torrent_status.hpp b/include/libtorrent/torrent_status.hpp index a33091fa7..17b6eebb6 100644 --- a/include/libtorrent/torrent_status.hpp +++ b/include/libtorrent/torrent_status.hpp @@ -473,6 +473,14 @@ namespace libtorrent // yet. Torrents are loaded on demand. bool is_loaded; + // these are set to true if this torrent is allowed to announce to the + // respective peer source. Whether they are true or false is determined by + // the queue logic/auto manager. Torrents that are not auto managed will + // always be allowed to announce to all peer sources. + bool announcing_to_trackers; + bool announcing_to_lsd; + bool announcing_to_dht; + // the info-hash for this torrent sha1_hash info_hash; }; diff --git a/src/torrent.cpp b/src/torrent.cpp index 796665d7f..dbd3d9f8c 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -11653,6 +11653,10 @@ namespace libtorrent st->seed_mode = m_seed_mode; st->moving_storage = m_moving_storage; + st->announcing_to_trackers = m_announce_to_trackers; + st->announcing_to_lsd = m_announce_to_lsd; + st->announcing_to_dht = m_announce_to_dht; + st->added_time = m_added_time; st->completed_time = m_completed_time;