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: Mon, 23 Oct 2006 13:08:31 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/10/23 13:08:31

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonMessages.ml commonOptions.ml 
        src/daemon/driver: driverCommands.ml 

Log message:
        patch #5474

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1061&r2=1.1062
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonMessages.ml?cvsroot=mldonkey&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.182&r2=1.183
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.185&r2=1.186

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1061
retrieving revision 1.1062
diff -u -b -r1.1061 -r1.1062
--- distrib/ChangeLog   23 Oct 2006 12:58:35 -0000      1.1061
+++ distrib/ChangeLog   23 Oct 2006 13:08:30 -0000      1.1062
@@ -15,6 +15,9 @@
 =========
 
 2006/10/23
+5474: New command bw_toggle (ported from Knockers Mulus client)
+- two new options: max_hard_upload_rate_2 and max_hard_download_rate_2
+- new command bw_toggle, quickly switch between two bandwidth options
 5480: Update Mozilla protocol handler, cleanup docs in distrib/
 5479: Configure: Force presence of camlp4
 5478: Support gdlib-config --static-libs function (new on Debian Etch)

Index: src/daemon/common/commonMessages.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonMessages.ml,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- src/daemon/common/commonMessages.ml 9 Oct 2006 16:19:34 -0000       1.57
+++ src/daemon/common/commonMessages.ml 23 Oct 2006 13:08:30 -0000      1.58
@@ -976,6 +976,9 @@
 <TD class=\"bu bbig\" title=\"Bandwidth statistics (set 
html_mods_bw_refresh_delay)\"
 onMouseOver=\"mOvr(this,'mOvr1');\" onMouseOut=\"mOut(this);\"
 onClick=\"mSub('fstatus','bw_stats');mSub('output','gdstats')\">Bandwidth 
stats</TD>
+<TD class=\"bu bbig\" title=\"Bandwidth toggle\"
+onMouseOver=\"mOvr(this,'mOvr1');\" onMouseOut=\"mOut(this);\"
+onClick=\"mSub('fstatus','bw_stats');mSub('output','bw_toggle')\">Bandwidth 
toggle</TD>
 </TR></TBODY></TABLE></DIV>
 
 <DIV ID=\"tab2\" style=\"display: none\">

Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -b -r1.182 -r1.183
--- src/daemon/common/commonOptions.ml  21 Oct 2006 19:35:54 -0000      1.182
+++ src/daemon/common/commonOptions.ml  23 Oct 2006 13:08:30 -0000      1.183
@@ -583,6 +583,14 @@
   < 4      -> download limited to upload * 3"
     int_option 50
 
+let max_hard_upload_rate_2 = define_option current_section 
["max_hard_upload_rate_2"]
+    "Second maximal upload rate for easy toggling (use bw_toggle)"
+    int_option 5
+
+let max_hard_download_rate_2 = define_option current_section 
["max_hard_download_rate_2"]
+    "Second maximal download rate for easy toggling (use bw_toggle)"
+    int_option 20
+
 let max_opened_connections = define_option current_section 
["max_opened_connections"]
   "Maximal number of opened connections"
     int_option 200

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -b -r1.185 -r1.186
--- src/daemon/driver/driverCommands.ml 23 Oct 2006 12:17:35 -0000      1.185
+++ src/daemon/driver/driverCommands.ml 23 Oct 2006 13:08:30 -0000      1.186
@@ -1054,6 +1054,25 @@
         ""
     ), ":\t\t\t\tprint current bandwidth stats";
 
+    "bw_toggle", Arg_none (fun o ->
+       let buf = o.conn_buf in
+       let ul_bkp = !!max_hard_upload_rate_2 in
+       let dl_bkp = !!max_hard_download_rate_2 in
+       max_hard_upload_rate_2 =:= !!max_hard_upload_rate;
+       max_hard_download_rate_2 =:= !!max_hard_download_rate;
+       max_hard_upload_rate =:= ul_bkp;
+       max_hard_download_rate =:=  dl_bkp;
+       let result =
+         Printf.sprintf "new upload rate: %d | new downloadrate: %d" ul_bkp 
dl_bkp
+       in
+       if o.conn_output = HTML then
+         html_mods_table_one_row buf "serversTable" "servers" [
+           ("", "srh", result); ]
+       else
+         Buffer.add_string buf result;
+       ""
+    ), ":\t\t\ttoggle between the two rate sets";
+
     "stats", Arg_none (fun o ->
         let buf = o.conn_buf in
         CommonInteractive.network_display_stats buf o;
@@ -1577,12 +1596,12 @@
                        strings_of_option global_login;
                        strings_of_option set_client_ip;
                        strings_of_option force_client_ip;
-                       strings_of_option run_as_user;
-                       strings_of_option run_as_useruid;
                        strings_of_option max_upload_slots;
                        strings_of_option dynamic_slots;
                        strings_of_option max_hard_upload_rate;
                        strings_of_option max_hard_download_rate;
+                       strings_of_option max_hard_upload_rate_2;
+                       strings_of_option max_hard_download_rate_2;
                        strings_of_option max_opened_connections;
                        strings_of_option max_indirect_connections;
                        strings_of_option max_connections_per_second;
@@ -1747,6 +1766,8 @@
                   | 8 ->
                       [
                        strings_of_option term_ansi;
+                       strings_of_option run_as_user;
+                       strings_of_option run_as_useruid;
                        strings_of_option messages_filter;
       strings_of_option comments_filter;
                        strings_of_option max_displayed_results;




reply via email to

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