From 12c52e8751133653e8f894636ce684aacd496b6f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 19 Oct 2018 16:27:42 +0200 Subject: [PATCH] back-port the fix from the lgtm fixes in master --- src/choker.cpp | 4 ++-- tools/clean.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/choker.cpp b/src/choker.cpp index 1ca14db36..88b40ab6a 100644 --- a/src/choker.cpp +++ b/src/choker.cpp @@ -84,10 +84,10 @@ namespace libtorrent // is greater than the send quanta, and it has been unchoked for at least one minute // then it's done with its upload slot, and we can de-prioritize it bool c1_quota_complete = !lhs->is_choked() - && c1 > t1->torrent_file().piece_length() * pieces + && c1 > boost::int64_t(t1->torrent_file().piece_length()) * pieces && aux::time_now() - lhs->time_of_last_unchoke() > minutes(1); bool c2_quota_complete = !rhs->is_choked() - && c2 > t2->torrent_file().piece_length() * pieces + && c2 > boost::int64_t(t2->torrent_file().piece_length()) * pieces && aux::time_now() - rhs->time_of_last_unchoke() > minutes(1); // if c2 has completed a quanta, it should be de-prioritized diff --git a/tools/clean.py b/tools/clean.py index 33677da11..620479470 100755 --- a/tools/clean.py +++ b/tools/clean.py @@ -16,7 +16,7 @@ def clean(): 'build-aux', '.deps', 'test_tmp_*', - 'bjam_build.*.xml' + 'bjam_build.*.xml', '*.exe', '*.pdb', '*.pyd',