[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr... |
Date: |
Thu, 08 Apr 2010 19:05:10 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 10/04/08 19:05:10
Modified files:
distrib : ChangeLog
src/daemon/driver: driverCommands.ml
Log message:
patch #7161
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1421&r2=1.1422
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.252&r2=1.253
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1421
retrieving revision 1.1422
diff -u -b -r1.1421 -r1.1422
--- distrib/ChangeLog 8 Apr 2010 19:01:34 -0000 1.1421
+++ distrib/ChangeLog 8 Apr 2010 19:05:09 -0000 1.1422
@@ -15,6 +15,12 @@
=========
2010/04/08
+7161: bw_toggle: Add options "high" and "low"
+- bw_toggle without options works as before
+- if "high" is added, the *_2 option set is used if max_opened_connections_2
+ is higher than max_opened_connections, otherwise the option values are kept
+- if "low" is added, the *_2 option set is used if max_opened_connections_2
+ is lower than max_opened_connections, otherwise the option values are kept
6959: DC: Fix invalid XML (ygrek)
- enhanced patch (use Xml.escape and properly escape attributes in
Xml.to_string)
Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -b -r1.252 -r1.253
--- src/daemon/driver/driverCommands.ml 27 Mar 2010 13:21:13 -0000 1.252
+++ src/daemon/driver/driverCommands.ml 8 Apr 2010 19:05:10 -0000 1.253
@@ -1134,8 +1134,8 @@
""
), ":\t\t\t\tprint current bandwidth stats";
- "bw_toggle", Arg_none (fun o ->
- if user2_is_admin o.conn_user.ui_user then begin
+ "bw_toggle", Arg_multiple (fun args o ->
+ let change_bw () =
let ul_bkp = !!max_hard_upload_rate_2 in
let dl_bkp = !!max_hard_download_rate_2 in
let max_conn = !!max_opened_connections_2 in
@@ -1145,6 +1145,18 @@
max_hard_upload_rate =:= ul_bkp;
max_hard_download_rate =:= dl_bkp;
max_opened_connections =:= max_conn;
+ in
+ if user2_is_admin o.conn_user.ui_user then begin
+ (
+ match (List.map String.lowercase args) with
+ | ["high"] ->
+ if !!max_opened_connections <
!!max_opened_connections_2 then
+ change_bw ()
+ | ["low"] ->
+ if !!max_opened_connections >
!!max_opened_connections_2 then
+ change_bw ()
+ | _ -> change_bw ()
+ );
print_command_result o (Printf.sprintf
"new upload rate: %d | new download rate: %d | new max opened
connections: %d"
!!max_hard_upload_rate !!max_hard_download_rate
!!max_opened_connections)
@@ -1152,7 +1164,7 @@
else
print_command_result o "You are not allowed to toggle bandwidth";
""
- ), ":\t\t\t\ttoggle between the two rate and opened connection sets";
+ ), "[<high|low>]:\t\t\ttoggle between the two rate and opened connection
sets, high/low depend on option max_open_connections*";
"costats", Arg_multiple (fun args o ->
let filter cs =
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr...,
mldonkey-commits <=