From 90372b6caf5e88464d11aa524374e0b670393f56 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 11 Sep 2011 03:39:24 +0000 Subject: [PATCH] fixed bug in auto manager which would never enable local peer discovery for torrents --- src/session_impl.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 635e867e5..a9254aa09 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -3564,6 +3564,13 @@ namespace aux { || t->state() == torrent_status::queued_for_checking)) continue; + --dht_limit; + --lsd_limit; + --tracker_limit; + t->set_announce_to_dht(dht_limit >= 0); + t->set_announce_to_trackers(tracker_limit >= 0); + t->set_announce_to_lsd(lsd_limit >= 0); + if (!t->is_paused() && !is_active(t, settings()) && hard_limit > 0) { @@ -3575,13 +3582,9 @@ namespace aux { { --hard_limit; --type_limit; - --dht_limit; - --tracker_limit; #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING || defined TORRENT_LOGGING t->log_to_all_peers(("AUTO MANAGER STARTING TORRENT: " + t->torrent_file().name()).c_str()); #endif - t->set_announce_to_dht(dht_limit >= 0); - t->set_announce_to_trackers(tracker_limit >= 0); t->set_allow_peers(true); } else