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: Wed, 04 Jan 2006 14:04:43 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    06/01/04 14:04:43

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonComplexOptions.ml 
                           commonComplexOptions.mli 
        src/daemon/driver: driverCommands.ml driverControlers.ml 

Log message:
        patch #4756

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.649&tr2=1.650&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.ml.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.mli.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml.diff?tr1=1.108&tr2=1.109&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/driver/driverControlers.ml.diff?tr1=1.56&tr2=1.57&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.649 mldonkey/distrib/ChangeLog:1.650
--- mldonkey/distrib/ChangeLog:1.649    Tue Jan  3 18:41:40 2006
+++ mldonkey/distrib/ChangeLog  Wed Jan  4 14:04:42 2006
@@ -11,6 +11,10 @@
 To compile MLDonkey on MinGW follow this guide:
 http://mldonkey.berlios.de/modules.php?name=Wiki&pagename=Windows
 
+2006/01/04
+4756: HTML: Print build- and runinfo on main page,
+      fix reload bug when changing html_mods/html_themes (Knocker)
+
 2006/01/03
 4751: Ease use of messages_filter option (pango)
 4753: Allow upper case MD4 for ed2k-links in mldonkey_submit (fcrozat)
Index: mldonkey/src/daemon/common/commonComplexOptions.ml
diff -u mldonkey/src/daemon/common/commonComplexOptions.ml:1.43 
mldonkey/src/daemon/common/commonComplexOptions.ml:1.44
--- mldonkey/src/daemon/common/commonComplexOptions.ml:1.43     Wed Dec 28 
21:37:39 2005
+++ mldonkey/src/daemon/common/commonComplexOptions.ml  Wed Jan  4 14:04:42 2006
@@ -1089,7 +1089,7 @@
   end;
   lprintf_nl () "Options backup as %s correctly saved" format
              
-let buildinfo o buf =
+let buildinfo html buf =
   let s =
   (
         "MLNet Multi-Network p2p client version " ^ Autoconf.current_version
@@ -1139,7 +1139,7 @@
           ^ (if Autoconf.check_bounds then " check-bounds" else " 
no-check-bounds")
   )
   in
-  if o.conn_output = HTML then
+  if html then
     begin
       Printf.bprintf buf "\\<div class=\\\"cs\\\"\\>";
       html_mods_table_header buf "versionTable" "results" [];
@@ -1152,7 +1152,7 @@
   else
     Printf.bprintf buf "Buildinfo:\n%s\n" s
   
-let runinfo o buf =
+let runinfo html buf =
   let s =
   (
         "Enabled Networks: " 
@@ -1182,7 +1182,7 @@
             )
   )    
   in
-  if o.conn_output = HTML then
+  if html then
     begin
       Printf.bprintf buf "\\<div class=\\\"cs\\\"\\>";
       html_mods_table_header buf "versionTable" "results" [];
@@ -1195,7 +1195,7 @@
   else
     Printf.bprintf buf "Runinfo:\n%s\n" s
 
-let diskinfo o buf =
+let diskinfo html buf =
   let list = ref [] in
   ignore (search_incoming_files ());
   ignore (search_incoming_directories ());
@@ -1216,7 +1216,7 @@
   let fill_strategy = String.make (!len_strategy - 4) ' ' in
   let fill_strategy_line = String.make (!len_strategy - 4) '-' in
   let counter = ref 0 in
-  if o.conn_output = HTML then
+  if html then
       html_mods_table_header buf "sharesTable" "shares" [
        ( "0", "srh", "Directory", "Directory" ) ;
        ( "0", "srh", "Directory type", "Type" ) ;
@@ -1250,7 +1250,7 @@
          | Some p -> Printf.sprintf "%d%%" p
        in
        let filesystem = Unix32.filesystem dir in
-       if o.conn_output = HTML then
+       if html then
          begin
            Printf.bprintf buf "\\<tr class=\\\"%s\\\"\\>
        \\<td class=\\\"sr\\\"\\>%s\\</td\\>
@@ -1268,7 +1268,7 @@
            (maxi !len_strategy (!len_strategy - String.length strategy)) 
strategy
            diskused diskfree percentfree filesystem
        ) !list;
-  if o.conn_output = HTML then
+  if html then
     Printf.bprintf buf "\\</table\\>\\</td\\>\\<tr\\>\\</table\\>\\</div\\>"
 
 let _ =
Index: mldonkey/src/daemon/common/commonComplexOptions.mli
diff -u mldonkey/src/daemon/common/commonComplexOptions.mli:1.14 
mldonkey/src/daemon/common/commonComplexOptions.mli:1.15
--- mldonkey/src/daemon/common/commonComplexOptions.mli:1.14    Wed Dec 28 
10:36:26 2005
+++ mldonkey/src/daemon/common/commonComplexOptions.mli Wed Jan  4 14:04:42 2006
@@ -21,9 +21,9 @@
 val save : unit -> unit
 val save_sources : unit -> unit
 val backup_options : unit -> unit
-val buildinfo : CommonTypes.ui_conn -> Buffer.t -> unit
-val runinfo : CommonTypes.ui_conn -> Buffer.t -> unit
-val diskinfo : CommonTypes.ui_conn -> Buffer.t -> unit
+val buildinfo : bool -> Buffer.t -> unit
+val runinfo : bool -> Buffer.t -> unit
+val diskinfo : bool -> Buffer.t -> unit
   
 val done_files :  CommonTypes.file list Options.option_record
 val files :  CommonTypes.file list Options.option_record
Index: mldonkey/src/daemon/driver/driverCommands.ml
diff -u mldonkey/src/daemon/driver/driverCommands.ml:1.108 
mldonkey/src/daemon/driver/driverCommands.ml:1.109
--- mldonkey/src/daemon/driver/driverCommands.ml:1.108  Sun Jan  1 19:25:42 2006
+++ mldonkey/src/daemon/driver/driverCommands.ml        Wed Jan  4 14:04:42 2006
@@ -451,27 +451,27 @@
 
     "sysinfo", Arg_none (fun o ->
        let buf = o.conn_buf in
-        let buildinfo = CommonComplexOptions.buildinfo o buf in
-        let runinfo = CommonComplexOptions.runinfo o buf in
-        let diskinfo = CommonComplexOptions.diskinfo o buf in
+        ignore(CommonComplexOptions.buildinfo (o.conn_output = HTML) buf);
+        ignore(CommonComplexOptions.runinfo (o.conn_output = HTML) buf);
+        ignore(CommonComplexOptions.diskinfo (o.conn_output = HTML) buf);
         ""
     ), ":\t\t\t\tprint mldonkey core build, runtime and disk information";
 
     "buildinfo", Arg_none (fun o ->
        let buf = o.conn_buf in
-        let buildinfo = CommonComplexOptions.buildinfo o buf in
+        ignore(CommonComplexOptions.buildinfo (o.conn_output = HTML) buf);
         ""
     ), ":\t\t\t\tprint mldonkey core build information";
 
     "runinfo", Arg_none (fun o ->
        let buf = o.conn_buf in
-        let runinfo = CommonComplexOptions.runinfo o buf in
+        ignore(CommonComplexOptions.runinfo (o.conn_output = HTML) buf);
         ""
     ), ":\t\t\t\tprint mldonkey runtime information";
 
     "diskinfo", Arg_none (fun o ->
        let buf = o.conn_buf in
-        let diskinfo = CommonComplexOptions.diskinfo o buf in
+        ignore(CommonComplexOptions.diskinfo (o.conn_output = HTML) buf);
         ""
     ), ":\t\t\t\tprint mldonkey disk information";
 
@@ -2667,7 +2667,6 @@
     ), "<num> \"<new name>\" :\t\tchange name of download <num> to <new name>";
 
     "dllink", Arg_multiple (fun args o ->
-        let buf = o.conn_buf in
         let query_networks url =
        let result = ref [] in
           if not (networks_iter_until_true (fun n ->
@@ -2945,7 +2944,7 @@
             CommonMessages.colour_changer() ;
           end;
 
-        "\\<script 
type=\\\"text/javascript\\\"\\>top.window.location.reload();\\</script\\>"
+       "\\<script 
type='text/javascript'\\>top.window.location.replace('/');\\</script\\>"
     ), ":\t\t\t\ttoggle html_mods";
 
 
@@ -2968,7 +2967,7 @@
                 num else 0;
             commands_frame_height =:= 
CommonMessages.styles.(!!html_mods_style).frame_height;
             CommonMessages.colour_changer ();
-            "\\<script 
type=\\\"text/javascript\\\"\\>top.window.location.reload();\\</script\\>"
+           "\\<script 
type='text/javascript'\\>top.window.location.replace('/');\\</script\\>"
           end
 
     ), ":\t\t\tselect html_mods_style <#>";
Index: mldonkey/src/daemon/driver/driverControlers.ml
diff -u mldonkey/src/daemon/driver/driverControlers.ml:1.56 
mldonkey/src/daemon/driver/driverControlers.ml:1.57
--- mldonkey/src/daemon/driver/driverControlers.ml:1.56 Sun Jan  1 19:37:52 2006
+++ mldonkey/src/daemon/driver/driverControlers.ml      Wed Jan  4 14:04:42 2006
@@ -1145,7 +1145,12 @@
 
         | "oneframe.html" ->
             html_open_page buf t r true;
-            Buffer.add_string buf !!motd_html
+            Buffer.add_string buf !!motd_html;
+           Buffer.add_string buf "<p><pre>";
+           ignore (CommonComplexOptions.buildinfo false buf);
+           Buffer.add_string buf "\n";
+           ignore (CommonComplexOptions.runinfo false buf);
+           Buffer.add_string buf "</pre>\n"
 
         | "bw_updown.png" ->
             (match http_error_no_gd "png" with
@@ -1563,6 +1568,6 @@
       default = http_handler http_options;
     } in
   option_hook allowed_ips (fun _ -> config.addrs <- !!allowed_ips);
-  let _ = find_port "http server" !!http_bind_addr http_port
-      (Http_server.handler config) in
+  ignore(find_port "http server" !!http_bind_addr http_port
+      (Http_server.handler config));
   config.port <- !!http_port




reply via email to

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