fixed bug in auto manager which would never enable local peer discovery for torrents

This commit is contained in:
Arvid Norberg 2011-09-11 03:39:24 +00:00
parent 675721d971
commit 90372b6caf
1 changed files with 7 additions and 4 deletions

View File

@ -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