[Top][All Lists]
[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: |
Sun, 03 Sep 2006 11:45:55 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 06/09/03 11:45:55
Modified files:
distrib : ChangeLog
src/daemon/common: commonGlobals.ml commonOptions.ml
Log message:
patch #5363
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.986&r2=1.987
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonGlobals.ml?cvsroot=mldonkey&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.171&r2=1.172
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.986
retrieving revision 1.987
diff -u -b -r1.986 -r1.987
--- distrib/ChangeLog 1 Sep 2006 17:17:58 -0000 1.986
+++ distrib/ChangeLog 3 Sep 2006 11:45:55 -0000 1.987
@@ -14,6 +14,12 @@
ChangeLog
=========
+2006/09/03
+5363: Limit max_hard_download_rate when max_hard_upload_rate < 10
+- upload >= 10 -> unlimited download
+- upload < 10 > 3 -> download limited to upload * 4
+- upload < 4 -> download limited to upload * 3
+
2006/09/01
5361: Faster filenames_variability computation (pango)
5360: HTML: Increase webinterface buffer to avoid problems with long output
Index: src/daemon/common/commonGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonGlobals.ml,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- src/daemon/common/commonGlobals.ml 11 Jun 2006 17:37:38 -0000 1.67
+++ src/daemon/common/commonGlobals.ml 3 Sep 2006 11:45:55 -0000 1.68
@@ -213,8 +213,21 @@
let payload_bandwidth = ref 0.
+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 &&
+ (!!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
+ max_hard_download_rate =:= !!max_hard_upload_rate * 4
+
let _ =
option_hook max_hard_upload_rate (fun _ ->
+ check_ul_dl_ratio ();
TcpBufferedSocket.change_rate upload_control
(!!max_hard_upload_rate * 1024);
payload_bandwidth :=
@@ -224,9 +237,9 @@
maxi (!!max_hard_upload_rate * 1024) 1024) *. 0.90;
);
option_hook max_hard_download_rate (fun _ ->
- let rate = !!max_hard_download_rate in
+ check_ul_dl_ratio ();
TcpBufferedSocket.change_rate download_control
- (rate * 1024))
+ (!!max_hard_download_rate * 1024))
let udp_write_controler = UdpSocket.new_bandwidth_controler upload_control
Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -b -r1.171 -r1.172
--- src/daemon/common/commonOptions.ml 1 Sep 2006 16:22:14 -0000 1.171
+++ src/daemon/common/commonOptions.ml 3 Sep 2006 11:45:55 -0000 1.172
@@ -572,7 +572,10 @@
let max_hard_download_rate = define_option current_section
["max_hard_download_rate"]
"The maximal download rate you can tolerate on your link in kBytes/s (0 = no
limit)
The limit will apply on all your connections (clients and servers) and both
- control and data messages."
+ control and data messages. Maximum value depends on max_hard_upload_rate:
+ >= 10 -> unlimited download
+ < 10 > 3 -> download limited to upload * 4
+ < 4 -> download limited to upload * 3"
int_option 50
let max_opened_connections = define_option current_section
["max_opened_connections"]
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/01
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/01
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...,
mldonkey-commits <=
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/03
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/04
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/05
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/05
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/14
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/14
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/16
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/16
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/19
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2006/09/22