From 5741f72ab354886183611d95c9cecedf7a569a77 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 7 May 2008 17:05:16 +0000 Subject: [PATCH] seed rank fix --- src/torrent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 3a2884116..e9d2ae9e5 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3310,9 +3310,9 @@ namespace libtorrent // if we haven't yet met the seed limits, set the seed_ratio_not_met // flag. That will make this seed prioritized size_type downloaded = (std::max)(m_total_downloaded, m_torrent_file->total_size()); - if (seed_time > s.seed_time_limit - || (seed_time > 1 && download_time / float(seed_time) > s.seed_time_ratio_limit) - || m_total_uploaded / downloaded > s.share_ratio_limit) + if (seed_time < s.seed_time_limit + && (seed_time > 1 && download_time / float(seed_time) < s.seed_time_ratio_limit) + && m_total_uploaded / downloaded < s.share_ratio_limit) ret |= seed_ratio_not_met; // if this torrent is running, and it was started less @@ -3338,7 +3338,7 @@ namespace libtorrent } else { - ret |= (downloaders * 10 / seeds) & prio_mask; + ret |= (downloaders * 100 / seeds) & prio_mask; } return ret;