seed rank fix

This commit is contained in:
Arvid Norberg 2008-05-07 17:05:16 +00:00
parent 4f859ba778
commit 5741f72ab3
1 changed files with 4 additions and 4 deletions

View File

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