From 9062266a84e8b05abcc5aa83b922976119804551 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 16 Sep 2007 14:16:42 +0000 Subject: [PATCH] - Fixed a ratio assert in libtorrent because we sent it -1 for unlimited instead of 0 --- TODO | 4 ++-- configure | 1 + src/bittorrent.cpp | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 18f2348d9..77226d8d5 100644 --- a/TODO +++ b/TODO @@ -57,8 +57,8 @@ - Wait that http://pastebin.ca/690649 is fixed LANGUAGES UPDATED: -- French *BETA7* -- English *BETA6* +- French *OK* +- English *OK* - Japanese *BETA6* - Swedish *BETA6* - Slovak *BETA6* diff --git a/configure b/configure index 707d9232d..6dcd2634e 100755 --- a/configure +++ b/configure @@ -354,6 +354,7 @@ public: QString shortname() const { return "Qt 4.3"; } bool exec() { + qWarning("QT VERSION: %s", QT_VERSION); return(QT_VERSION >= 0x040300); } }; diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index be7c15de4..60f8960de 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -955,6 +955,10 @@ void bittorrent::setUploadRateLimit(long rate) { // This function will apply to same ratio to all torrents void bittorrent::setGlobalRatio(float ratio) { if(ratio != -1 && ratio < 1.) ratio = 1.; + if(ratio == -1) { + // 0 means unlimited for libtorrent + ratio = 0; + } std::vector handles = s->get_torrents(); unsigned int nbHandles = handles.size(); for(unsigned int i=0; i