From 78b96accda17800309d32e7864e00a5d8b0006e2 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 20 Aug 2010 14:17:46 +0000 Subject: [PATCH] Fix "Seed until ratio reaches x.x" feature --- src/bittorrent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 881d2d1b8..20bd1774c 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -203,7 +203,7 @@ bool Bittorrent::isPexEnabled() const { } void Bittorrent::processBigRatios() { - if(ratio_limit <= 0) return; + if(ratio_limit < 0) return; qDebug("Process big ratios..."); std::vector torrents = s->get_torrents(); std::vector::iterator torrentIT; @@ -1838,7 +1838,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { // Torrents will a ratio superior to the given value will // be automatically deleted void Bittorrent::setMaxRatio(float ratio) { - if(ratio <= 0) ratio = -1.; + if(ratio < 0) ratio = -1.; if(ratio_limit == -1 && ratio != -1) { Q_ASSERT(!BigRatioTimer); BigRatioTimer = new QTimer(this);