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: Sun, 01 Jul 2007 13:00:13 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       07/07/01 13:00:13

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonOptions.ml 
        src/gtk/gui    : gui_installer.ml gui_options.ml 
        src/gtk/newgui : gui_installer.ml gui_options.ml 
        src/gtk2/gui   : guiOptions.ml gui_installer.ml 
        src/networks/bittorrent: bTOptions.ml bTTracker.ml 
        src/networks/direct_connect: dcOptions.ml 
        src/networks/donkey: donkeyOptions.ml 
        src/networks/gnutella: gnutellaOptions.ml gnutellaSupernode.ml 
        src/networks/gnutella2: g2Supernode.ml 
        src/networks/openFT: openFTOptions.ml 
        src/networks/opennap: opennapOptions.ml 
        src/networks/soulseek: slskOptions.ml 
        src/utils/lib  : options.ml4 options.mli 

Log message:
        patch #6061

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1295&r2=1.1296
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.209&r2=1.210
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/gui/gui_installer.ml?cvsroot=mldonkey&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/gui/gui_options.ml?cvsroot=mldonkey&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/newgui/gui_installer.ml?cvsroot=mldonkey&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/newgui/gui_options.ml?cvsroot=mldonkey&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk2/gui/guiOptions.ml?cvsroot=mldonkey&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk2/gui/gui_installer.ml?cvsroot=mldonkey&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTOptions.ml?cvsroot=mldonkey&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTTracker.ml?cvsroot=mldonkey&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/direct_connect/dcOptions.ml?cvsroot=mldonkey&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyOptions.ml?cvsroot=mldonkey&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/gnutella/gnutellaOptions.ml?cvsroot=mldonkey&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/gnutella/gnutellaSupernode.ml?cvsroot=mldonkey&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/gnutella2/g2Supernode.ml?cvsroot=mldonkey&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/openFT/openFTOptions.ml?cvsroot=mldonkey&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/opennap/opennapOptions.ml?cvsroot=mldonkey&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/soulseek/slskOptions.ml?cvsroot=mldonkey&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/lib/options.ml4?cvsroot=mldonkey&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/lib/options.mli?cvsroot=mldonkey&r1=1.12&r2=1.13

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1295
retrieving revision 1.1296
diff -u -b -r1.1295 -r1.1296
--- distrib/ChangeLog   1 Jul 2007 12:59:24 -0000       1.1295
+++ distrib/ChangeLog   1 Jul 2007 13:00:11 -0000       1.1296
@@ -15,6 +15,7 @@
 =========
 
 2007/07/01
+6061: Options: New type port_option, values are bound to be >= 0 and <= 65535
 6060: Do not send mail notifications when smtp_server = ""
 6059: Multiuser: Avoid double group entries in user_groups
 6056: Log username, IP:port and old/new value when changing options

Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -b -r1.209 -r1.210
--- src/daemon/common/commonOptions.ml  24 Jun 2007 18:40:02 -0000      1.209
+++ src/daemon/common/commonOptions.ml  1 Jul 2007 13:00:11 -0000       1.210
@@ -479,27 +479,27 @@
   ~desc: "The port to connect the GUI"
   ~restart: true
   "port for Graphical Interfaces"
-    int_option 4001
+    port_option 4001
 
 let gift_port = define_option current_section ["gift_port"]
   ~desc: "The port to connect for GiFT GUIs."
   ~restart: true
   "port for GiFT Graphical Interfaces interaction. It was 1213, but the 
default is
   now 0 for disabled, because it does not check for a password." 
-    int_option 0
+    port_option 0
 
 let http_port = define_option current_section ["http_port"]
   ~desc: "The port to connect via HTTP"
   ~public: true
   ~restart: true
   "The port used to connect to your client with a WEB browser"
-    int_option 4080
+    port_option 4080
 
 let telnet_port = define_option current_section ["telnet_port"]
   ~desc: "The port to connect via telnet"
   ~restart: true
   "port for user interaction"
-    int_option 4000
+    port_option 4000
 
 let http_bind_addr = define_expert_option current_section ["http_bind_addr"]
   ~restart: true
@@ -1116,7 +1116,7 @@
 
 let http_proxy_port = define_option current_section ["http_proxy_port"]
   "Port of HTTP proxy"
-    int_option 8080
+    port_option 8080
 
 let http_proxy_tcp = define_option current_section ["http_proxy_tcp"]
   "Direct TCP connections to HTTP proxy (the proxy should support CONNECT)"
@@ -1139,7 +1139,7 @@
 
 let smtp_port = define_option current_section ["smtp_port"]
   "The port to use on the mail server (default 25)"
-    int_option 25
+    port_option 25
 
 let mail = define_option current_section ["mail"]
   "Your e-mail if you want to receive mails when downloads are completed"

Index: src/gtk/gui/gui_installer.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/gui/gui_installer.ml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/gtk/gui/gui_installer.ml        6 Oct 2005 10:21:08 -0000       1.4
+++ src/gtk/gui/gui_installer.ml        1 Jul 2007 13:00:11 -0000       1.5
@@ -172,7 +172,7 @@
     define_option downloads_ini ["http_port"] "The port used to connect to 
your client with a WEB browser" int_option 4080
     in
   
-  let telnet_port = define_option downloads_ini ["telnet_port"] "port for user 
interaction" int_option 4000
+  let telnet_port = define_option downloads_ini ["telnet_port"] "port for user 
interaction" port_option 4000
     in
   
   let http_login = 

Index: src/gtk/gui/gui_options.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/gui/gui_options.ml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/gtk/gui/gui_options.ml  5 Aug 2005 00:56:13 -0000       1.5
+++ src/gtk/gui/gui_options.ml  1 Jul 2007 13:00:11 -0000       1.6
@@ -497,7 +497,7 @@
 let password = define_option mldonkey_gui_section ["password"] 
     (gettext M.h_gui_password) string_option ""
 let port = define_option mldonkey_gui_section ["port"] 
-    (gettext M.h_gui_port) int_option 4001
+    (gettext M.h_gui_port) port_option 4001
 let hostname = define_option mldonkey_gui_section ["hostname"] 
     (gettext M.h_hostname) string_option "localhost"
 

Index: src/gtk/newgui/gui_installer.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/newgui/gui_installer.ml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/gtk/newgui/gui_installer.ml     5 Aug 2005 00:56:13 -0000       1.5
+++ src/gtk/newgui/gui_installer.ml     1 Jul 2007 13:00:11 -0000       1.6
@@ -159,7 +159,7 @@
     define_option installed_section ["http_port"] "The port used to connect to 
your client with a WEB browser" int_option 4080
     in
   
-  let telnet_port = define_option installed_section ["telnet_port"] "port for 
user interaction" int_option 4000
+  let telnet_port = define_option installed_section ["telnet_port"] "port for 
user interaction" port_option 4000
     in
   
   let http_login = 

Index: src/gtk/newgui/gui_options.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/newgui/gui_options.ml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/gtk/newgui/gui_options.ml       27 Jun 2006 10:38:35 -0000      1.14
+++ src/gtk/newgui/gui_options.ml       1 Jul 2007 13:00:11 -0000       1.15
@@ -754,7 +754,7 @@
 let port = define_option mldonkey_gui_section 
     ["port"] 
     ( M.h_gui_port) 
-    int_option 4001
+    port_option 4001
 
 let hostname = define_option mldonkey_gui_section 
     ["hostname"] 

Index: src/gtk2/gui/guiOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk2/gui/guiOptions.ml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/gtk2/gui/guiOptions.ml  13 Nov 2005 17:42:09 -0000      1.6
+++ src/gtk2/gui/guiOptions.ml  1 Jul 2007 13:00:11 -0000       1.7
@@ -158,7 +158,7 @@
     ["gtk_connection_http_proxy_port"]
     ~desc:"HTTP proxy server port"
     "Port of HTTP proxy"
-    int_option 8080
+    port_option 8080
 
 let gtk_connection_http_use_proxy = define_option current_section
     ["gtk_connection_http_use_proxy"]
@@ -184,7 +184,7 @@
     ["gtk_client_port"]
     ~desc:"MLgui port"
     "The server port to connect to"
-    int_option 4001
+    port_option 4001
 
 let gtk_client_hostname = define_option current_section
     ["gtk_client_hostname"]

Index: src/gtk2/gui/gui_installer.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk2/gui/gui_installer.ml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/gtk2/gui/gui_installer.ml       5 Aug 2005 00:56:13 -0000       1.2
+++ src/gtk2/gui/gui_installer.ml       1 Jul 2007 13:00:11 -0000       1.3
@@ -159,7 +159,7 @@
     define_option installed_section ["http_port"] "The port used to connect to 
your client with a WEB browser" int_option 4080
     in
   
-  let telnet_port = define_option installed_section ["telnet_port"] "port for 
user interaction" int_option 4000
+  let telnet_port = define_option installed_section ["telnet_port"] "port for 
user interaction" port_option 4000
     in
   
   let http_login = 

Index: src/networks/bittorrent/bTOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTOptions.ml,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- src/networks/bittorrent/bTOptions.ml        24 Jun 2007 18:41:55 -0000      
1.33
+++ src/networks/bittorrent/bTOptions.ml        1 Jul 2007 13:00:12 -0000       
1.34
@@ -28,7 +28,7 @@
 let client_port = define_option bittorrent_section ["client_port"]
   ~restart: true
   "The port to bind the client to"
-    int_option 6882
+    port_option 6882
 
 (* Generate client_uid *)
 (* current_version could be "2.6.6.CVS" (why send the dots?)

Index: src/networks/bittorrent/bTTracker.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTTracker.ml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- src/networks/bittorrent/bTTracker.ml        26 May 2007 23:21:47 -0000      
1.27
+++ src/networks/bittorrent/bTTracker.ml        1 Jul 2007 13:00:12 -0000       
1.28
@@ -98,7 +98,7 @@
 let tracker_port = define_option bittorrent_section ["tracker_port"]
   ~restart: true
   "The port to bind the tracker to"
-    int_option 6881
+    port_option 6881
 
 let max_tracked_files = define_option bittorrent_section ["max_tracked_files"]
   "The maximal number of tracked files (to prevend saturation attack)"

Index: src/networks/direct_connect/dcOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/direct_connect/dcOptions.ml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/networks/direct_connect/dcOptions.ml    1 Jun 2007 19:31:09 -0000       
1.9
+++ src/networks/direct_connect/dcOptions.ml    1 Jul 2007 13:00:12 -0000       
1.10
@@ -29,7 +29,7 @@
   
 let dc_port = define_option directconnect_section ["client_port"]
     "The port to bind the client to"
-    int_option 4444
+    port_option 4444
   
 let dc_open_slots = define_option directconnect_section ["dc_open_slots"]
     "How many slots are open to other clients"

Index: src/networks/donkey/donkeyOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyOptions.ml,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- src/networks/donkey/donkeyOptions.ml        19 Apr 2007 13:44:16 -0000      
1.64
+++ src/networks/donkey/donkeyOptions.ml        1 Jul 2007 13:00:12 -0000       
1.65
@@ -32,7 +32,7 @@
 let donkey_port = define_option donkey_section ["port"]
   ~restart: true
   "The port used for connection by other donkey clients."
-    int_option (2000 + Random.int 20000)
+    port_option (2000 + Random.int 20000)
 
 let check_client_connections_delay = define_expert_option donkey_section 
["check_client_connections_delay"]
   "Delay used to request file sources"
@@ -283,7 +283,7 @@
 let overnet_port = define_option overnet_section 
[overnet_options_section_name; "port"]
   ~restart: true
   "port for overnet"
-    int_option (2000 + Random.int 20000)
+    port_option (2000 + Random.int 20000)
 
 let options_version = define_expert_option donkey_section ["options_version"]
   ~internal: true

Index: src/networks/gnutella/gnutellaOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/gnutella/gnutellaOptions.ml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/networks/gnutella/gnutellaOptions.ml    15 Jan 2007 18:26:27 -0000      
1.21
+++ src/networks/gnutella/gnutellaOptions.ml    1 Jul 2007 13:00:12 -0000       
1.22
@@ -39,7 +39,7 @@
 let client_port = define_option gnutella_section ["client_port"]
     ~restart: true
     "The port to bind the client to"
-    int_option GnutellaNetwork.port
+    port_option GnutellaNetwork.port
   
 let gnutella_experimental = define_option gnutella_section
     ["experimental"]

Index: src/networks/gnutella/gnutellaSupernode.ml
===================================================================
RCS file: 
/sources/mldonkey/mldonkey/src/networks/gnutella/gnutellaSupernode.ml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/networks/gnutella/gnutellaSupernode.ml  1 Nov 2004 11:23:01 -0000       
1.1
+++ src/networks/gnutella/gnutellaSupernode.ml  1 Jul 2007 13:00:12 -0000       
1.2
@@ -96,7 +96,7 @@
 let supernode_port = define_option gnutella_section 
   ["supernode_port"]
   "(only for development tests)"  
-    int_option 6348
+    port_option 6348
   
 let supernode_degree = define_option gnutella_section 
   ["supernode_degree"]

Index: src/networks/gnutella2/g2Supernode.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/gnutella2/g2Supernode.ml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/networks/gnutella2/g2Supernode.ml       19 May 2006 23:43:55 -0000      
1.3
+++ src/networks/gnutella2/g2Supernode.ml       1 Jul 2007 13:00:12 -0000       
1.4
@@ -101,7 +101,7 @@
 let supernode_port = define_option gnutella_section 
   ["supernode_port"]
   "(only for development tests)"  
-    int_option 6348
+    port_option 6348
   
 let supernode_degree = define_option gnutella_section 
   ["supernode_degree"]

Index: src/networks/openFT/openFTOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/openFT/openFTOptions.ml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/networks/openFT/openFTOptions.ml        15 Jan 2007 18:26:27 -0000      
1.5
+++ src/networks/openFT/openFTOptions.ml        1 Jul 2007 13:00:12 -0000       
1.6
@@ -29,12 +29,12 @@
 let port = define_option openft_ini ["client_port"]
     ~restart: true
     "The port to bind the client to"
-    int_option 1215
+    port_option 1215
 
 let http_port = define_option openft_ini ["http_port"]
     ~restart: true
     "The port to bind the client to for downloads"
-    int_option 1216
+    port_option 1216
     
 let max_known_ultrapeers = define_option openft_ini ["max_known_ultrapeers"]
   "Maximal number of ultrapeers remembered"

Index: src/networks/opennap/opennapOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/opennap/opennapOptions.ml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- src/networks/opennap/opennapOptions.ml      15 Jan 2007 18:26:27 -0000      
1.12
+++ src/networks/opennap/opennapOptions.ml      1 Jul 2007 13:00:13 -0000       
1.13
@@ -29,7 +29,7 @@
 let client_port = define_option opennap_section ["client_port"]
     ~restart: true
     "The port to bind the client to"
-    int_option 6699
+    port_option 6699
   
 let max_connected_servers = define_option opennap_section 
["max_connected_servers"] 
     "The number of servers you want to stay connected to" int_option 5

Index: src/networks/soulseek/slskOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/soulseek/slskOptions.ml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/networks/soulseek/slskOptions.ml        15 Jan 2007 18:26:27 -0000      
1.10
+++ src/networks/soulseek/slskOptions.ml        1 Jul 2007 13:00:13 -0000       
1.11
@@ -48,7 +48,7 @@
 let slsk_port = define_option soulseek_section ["client_port"]
   ~restart: true
   "The port to bind the client to"
-    int_option 2234
+    port_option 2234
   
 let login = define_option soulseek_section ["login"]
   "Your login on SoulSeek" string_option ""

Index: src/utils/lib/options.ml4
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/lib/options.ml4,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- src/utils/lib/options.ml4   1 Jul 2007 12:57:04 -0000       1.26
+++ src/utils/lib/options.ml4   1 Jul 2007 13:00:13 -0000       1.27
@@ -532,6 +532,13 @@
   | v when v > 100 -> 100
   | v -> v
 
+let port_to_value i = IntValue (Int64.of_int i)
+let value_to_port v =
+  match Int64.to_int (value_to_int64 v) with
+  | v when v < 0 -> 2000 + Random.int 40000
+  | v when v > 65535 -> 2000 + Random.int 40000
+  | v -> v
+
 (* The Pervasives version is too restrictive *)
 let bool_of_string s =
   match String.lowercase s with
@@ -748,7 +755,7 @@
 let int_option = define_option_class "Int" value_to_int int_to_value
 let int64_option = define_option_class "Int64" value_to_int64 int64_to_value
 let percent_option = define_option_class "Int" value_to_percent 
percent_to_value
-
+let port_option = define_option_class "Int" value_to_port port_to_value
   
 let bool_option = define_option_class "Bool" value_to_bool bool_to_value
 let float_option = define_option_class "Float" value_to_float float_to_value

Index: src/utils/lib/options.mli
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/lib/options.mli,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- src/utils/lib/options.mli   24 Jun 2007 18:38:29 -0000      1.12
+++ src/utils/lib/options.mli   1 Jul 2007 13:00:13 -0000       1.13
@@ -96,6 +96,7 @@
 val int_option : int option_class
 val int64_option : int64 option_class
 val percent_option : int option_class
+val port_option : int option_class
 val bool_option : bool option_class
 val float_option : float option_class
 val path_option : string list option_class
@@ -165,6 +166,8 @@
 val int64_to_value : int64 -> option_value
 val value_to_percent : option_value -> int
 val percent_to_value : int -> option_value
+val value_to_port : option_value -> int
+val port_to_value : int -> option_value
 val bool_of_string : string -> bool
 val value_to_bool : option_value -> bool
 val bool_to_value : bool -> option_value




reply via email to

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