mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Sat, 16 Sep 2006 09:37:00 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/09/16 09:37:00

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonGlobals.ml 

Log message:
        patch #5394

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1006&r2=1.1007
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonGlobals.ml?cvsroot=mldonkey&r1=1.69&r2=1.70

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1006
retrieving revision 1.1007
diff -u -b -r1.1006 -r1.1007
--- distrib/ChangeLog   14 Sep 2006 18:00:21 -0000      1.1006
+++ distrib/ChangeLog   16 Sep 2006 09:36:59 -0000      1.1007
@@ -14,6 +14,11 @@
 ChangeLog
 =========
 
+2006/09/16
+5394: Fix max_hard_up/download_rate computation
+- crashed on Windows when max_hard_upload_rate = 0
+- when max_hard_upload_rate = 0 max_hard_download_rate was badly computed
+
 2006/09/14 version 2.8.0 = tag release-2-8-0
 5390: Distinguish between charsets zh_cn and zh_tw
 5389: Fix verify_chunks (pango)

Index: src/daemon/common/commonGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonGlobals.ml,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- src/daemon/common/commonGlobals.ml  5 Sep 2006 14:18:24 -0000       1.69
+++ src/daemon/common/commonGlobals.ml  16 Sep 2006 09:37:00 -0000      1.70
@@ -216,13 +216,14 @@
 let check_ul_dl_ratio () =
   if !!max_hard_upload_rate < 0 then max_hard_upload_rate =:= 0;
   if !!max_hard_download_rate < 0 then max_hard_download_rate =:= 0;
-  if !!max_hard_upload_rate < 4 &&
+  if !!max_hard_upload_rate < 4 && !!max_hard_upload_rate > 0 &&
      (!!max_hard_upload_rate * 3 < !!max_hard_download_rate ||
        !!max_hard_download_rate = 0) then
       max_hard_download_rate =:= !!max_hard_upload_rate * 3
   else
-    if !!max_hard_upload_rate < 10 && (!!max_hard_upload_rate * 4 <
-       !!max_hard_download_rate || !!max_hard_download_rate = 0) then
+    if !!max_hard_upload_rate < 10 && !!max_hard_upload_rate > 0 &&
+       (!!max_hard_upload_rate * 4 < !!max_hard_download_rate ||
+         !!max_hard_download_rate = 0) then
          max_hard_download_rate =:= !!max_hard_upload_rate * 4
 
 let _ =




reply via email to

[Prev in Thread] Current Thread [Next in Thread]