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, 20 Oct 2007 20:02:13 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       07/10/20 20:02:13

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

Log message:
        patch #6242

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1330&r2=1.1331
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonGlobals.ml?cvsroot=mldonkey&r1=1.87&r2=1.88
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.216&r2=1.217
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverMain.ml?cvsroot=mldonkey&r1=1.142&r2=1.143

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1330
retrieving revision 1.1331
diff -u -b -r1.1330 -r1.1331
--- distrib/ChangeLog   17 Oct 2007 21:51:27 -0000      1.1330
+++ distrib/ChangeLog   20 Oct 2007 20:02:13 -0000      1.1331
@@ -14,6 +14,9 @@
 ChangeLog
 =========
 
+2007/10/20
+6242: Allow deactivation of [telnet|gui|gift]_port by setting it to 0
+
 2007/10/17
 6240: GTK1 oldgui: Hide password in server settings
 6239: Update GNU config.guess and config.sub to version 2007/07

Index: src/daemon/common/commonGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonGlobals.ml,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- src/daemon/common/commonGlobals.ml  9 Sep 2007 14:44:15 -0000       1.87
+++ src/daemon/common/commonGlobals.ml  20 Oct 2007 20:02:13 -0000      1.88
@@ -246,8 +246,6 @@
 
 let udp_read_controler = UdpSocket.new_bandwidth_controler download_control
 
-let gui_server_sock = ref (None : TcpServerSocket.t option)
-
 let pid = Unix.getpid ()
 
 let do_at_exit f =

Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -b -r1.216 -r1.217
--- src/daemon/common/commonOptions.ml  9 Sep 2007 14:54:19 -0000       1.216
+++ src/daemon/common/commonOptions.ml  20 Oct 2007 20:02:13 -0000      1.217
@@ -478,7 +478,7 @@
 let gui_port = define_option current_section ["gui_port"]
   ~desc: "The port to connect the GUI"
   ~restart: true
-  "port for Graphical Interfaces"
+  "port for Graphical Interfaces, 0 to deactivate GUI interface"
     port_option 4001
 
 let gift_port = define_option current_section ["gift_port"]
@@ -492,13 +492,13 @@
   ~desc: "The port to connect via HTTP"
   ~public: true
   ~restart: true
-  "The port used to connect to your client with a WEB browser"
+  "The port used to connect to your client with a web browser, 0 to deactivate 
web interface"
     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"
+  "port for user interaction, 0 to deactivate telnet interface"
     port_option 4000
 
 let http_bind_addr = define_expert_option current_section ["http_bind_addr"]

Index: src/daemon/driver/driverMain.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverMain.ml,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -b -r1.142 -r1.143
--- src/daemon/driver/driverMain.ml     24 Jun 2007 18:40:03 -0000      1.142
+++ src/daemon/driver/driverMain.ml     20 Oct 2007 20:02:13 -0000      1.143
@@ -108,14 +108,32 @@
             (Printexc2.to_string e);
     end;
 
+  if !!telnet_port <> 0 then begin 
+      try
   ignore (find_port  "telnet server" !!telnet_bind_addr
       telnet_port DriverControlers.telnet_handler);
+      with e ->
+          lprintf_nl (_b "Exception %s while starting Telnet interface")
+            (Printexc2.to_string e);
+    end;
+
+  if !!gui_port <> 0 then begin 
+      try
+        ignore (find_port "gui server" !!gui_bind_addr
+          gui_port gui_handler);
+      with e ->
+          lprintf_nl (_b "Exception %s while starting GUI interface")
+            (Printexc2.to_string e);
+    end;
 
-  gui_server_sock := find_port "gui server"  !!gui_bind_addr
-    gui_port gui_handler;
-  if !!gift_port <> 0 then
+  if !!gift_port <> 0 then begin
+      try
     ignore (find_port "gift server"  !!gui_bind_addr
         gift_port gift_handler);
+      with e ->
+          lprintf_nl (_b "Exception %s while starting GUI interface")
+            (Printexc2.to_string e);
+    end;
 
   add_infinite_option_timer update_gui_delay DriverInterface.update_gui_info;
   add_infinite_timer 1. second_timer
@@ -516,14 +534,16 @@
   Options.prune_file downloads_ini;
   Options.prune_file users_ini;
   add_timer 1. (fun _ -> try CommonWeb.load_web_infos true false with _ -> ());
-  lprintf_nl  (_b "To command: telnet %s %d")
+  if !!telnet_port <> 0 then lprintf_nl  (_b "To command: telnet %s %d")
        (if !!telnet_bind_addr = Ip.any then "127.0.0.1"
                else Ip.to_string !!telnet_bind_addr)  !!telnet_port;
+  if !!http_port <> 0 then begin
   lprintf_nl  (_b "Or with browser: http://%s:%d";)
        (if !!http_bind_addr = Ip.any then "127.0.0.1"
                else Ip.to_string !!http_bind_addr)  !!http_port;
-  lprintf_nl  (_b "For a GUI check out http://sancho-gui.sourceforge.net";);
-  lprintf_nl  (_b "Connect to IP %s, port %d")
+    lprintf_nl  (_b "For a GUI check out http://sancho-gui.sourceforge.net";)
+  end;
+  if !!gui_port <> 0 then lprintf_nl  (_b "Connect to IP %s, port %d")
        (if !!gui_bind_addr = Ip.any then "127.0.0.1"
                else Ip.to_string !!gui_bind_addr)  !!gui_port;
   lprintf_nl  (_b "If you connect from a remote machine adjust allowed_ips");




reply via email to

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