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, 18 Dec 2005 14:50:39 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    05/12/18 14:50:39

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonClient.ml commonComplexOptions.ml 
                           commonGlobals.ml commonInteractive.ml 
                           commonOptions.ml commonSwarming2.ml 
        src/networks/bittorrent: bTClients.ml 
        src/networks/direct_connect: dcServers.ml 
        src/networks/donkey: donkeyClient.ml donkeyComplexOptions.ml 
                             donkeyFiles.ml donkeyGlobals.ml 
                             donkeyIndexer.ml donkeyInteractive.ml 
                             donkeyMain.ml donkeyOneFile.ml 
                             donkeyOptions.ml donkeyProtoClient.ml 
                             donkeyProtoCom.ml donkeyProtoOvernet.ml 
                             donkeyServers.ml donkeyShare.ml 
                             donkeySupernode.ml donkeyThieves.ml 
        src/networks/fileTP: fileTPHTTP.ml 
        src/networks/gnutella: gnutellaClients.ml gnutellaFunctions.ml 
                               gnutellaProto.ml 
        src/networks/gnutella2: g2Handler.ml g2Proto.ml 
        src/networks/opennap: opennapServers.ml 
        src/utils/net  : basicSocket.ml ip_set.ml 

Log message:
        patch #4721

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.627&tr2=1.628&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonClient.ml.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.ml.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonGlobals.ml.diff?tr1=1.59&tr2=1.60&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonInteractive.ml.diff?tr1=1.58&tr2=1.59&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonOptions.ml.diff?tr1=1.106&tr2=1.107&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonSwarming2.ml.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/bittorrent/bTClients.ml.diff?tr1=1.60&tr2=1.61&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/direct_connect/dcServers.ml.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml.diff?tr1=1.73&tr2=1.74&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyComplexOptions.ml.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyFiles.ml.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml.diff?tr1=1.62&tr2=1.63&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyIndexer.ml.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml.diff?tr1=1.76&tr2=1.77&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyMain.ml.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyOneFile.ml.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyOptions.ml.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyProtoClient.ml.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyProtoCom.ml.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyProtoOvernet.ml.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyServers.ml.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyShare.ml.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeySupernode.ml.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyThieves.ml.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPHTTP.ml.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaClients.ml.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaFunctions.ml.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella/gnutellaProto.ml.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella2/g2Handler.ml.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/gnutella2/g2Proto.ml.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/opennap/opennapServers.ml.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/net/basicSocket.ml.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/net/ip_set.ml.diff?tr1=1.21&tr2=1.22&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.627 mldonkey/distrib/ChangeLog:1.628
--- mldonkey/distrib/ChangeLog:1.627    Sat Dec 17 21:15:46 2005
+++ mldonkey/distrib/ChangeLog  Sun Dec 18 14:50:38 2005
@@ -11,6 +11,9 @@
 To compile MLDonkey on MinGW follow this guide:
 http://mldonkey.berlios.de/modules.php?name=Wiki&pagename=Windows
 
+2005/12/18
+4721: Log: Improve output for verbosity "verb", remove verbosity "hid"
+
 2005/12/17
 4719: Fix linking of dp500 (pango)
 4715: OV: Improve searching, longer ov timeout, some more bugfixes (bogeyman)
Index: mldonkey/src/daemon/common/commonClient.ml
diff -u mldonkey/src/daemon/common/commonClient.ml:1.21 
mldonkey/src/daemon/common/commonClient.ml:1.22
--- mldonkey/src/daemon/common/commonClient.ml:1.21     Wed Dec 14 21:17:46 2005
+++ mldonkey/src/daemon/common/commonClient.ml  Sun Dec 18 14:50:38 2005
@@ -457,12 +457,13 @@
       if i.GuiTypes.client_uploaded = Int64.zero && ctime > 1 then
         begin
          client_disconnect c;
-          if !verbose then lprintf_nl "disconnected client %d: [%s %s] %s 
after %d minute of silence."
+          if !verbose then lprintf_nl "[cCl] disconnected client %d: [%s %s] 
%s after %d %s of silence."
            (client_num c)
            i.GuiTypes.client_software
            i.GuiTypes.client_release
            i.GuiTypes.client_name
            ctime
+           (if ctime = 1 then "minute" else "minutes")
        end
     with _ -> ()
   ) !uploaders
Index: mldonkey/src/daemon/common/commonComplexOptions.ml
diff -u mldonkey/src/daemon/common/commonComplexOptions.ml:1.40 
mldonkey/src/daemon/common/commonComplexOptions.ml:1.41
--- mldonkey/src/daemon/common/commonComplexOptions.ml:1.40     Wed Dec 14 
21:22:07 2005
+++ mldonkey/src/daemon/common/commonComplexOptions.ml  Sun Dec 18 14:50:38 2005
@@ -101,9 +101,9 @@
           set_file_state file file_state;       
           if !verbose then
           (match file_state with
-              FileDownloading -> lprintf_nl () "New downloading file";
-            | FileDownloaded -> lprintf_nl () "New downloaded file";
-            | _ -> lprintf_nl () "New file with other state"
+              FileDownloading -> lprintf_nl () "New downloading file - check 
complete";
+            | FileDownloaded -> lprintf_nl () "New downloaded file - check 
complete";
+            | _ -> lprintf_nl () "New file with other state - check complete"
           );
           
           (try
@@ -1003,7 +1003,7 @@
        if size > Sys.max_string_length then
          begin
            Tar.close_out otar;
-           failwith (Printf.sprintf "Tar: file %s too big" arg)
+           failwith (Printf.sprintf "Tar: file %s too big, limit %d byte" arg 
Sys.max_string_length)
          end;
        let header = 
          { Tar.t_name = arg;
@@ -1034,7 +1034,7 @@
              && Autoconf.windows && arg = "fasttrack.ini" then
               (* for whatever reason this error is raised on Windows,
                  but fasttrack.ini is stored correctly *)
-             if !verbose_hidden_errors then
+             if !verbose then
                lprintf_nl () "Tar: Windows specific pseudo error %s in %s" 
error arg
              else ()
            else
Index: mldonkey/src/daemon/common/commonGlobals.ml
diff -u mldonkey/src/daemon/common/commonGlobals.ml:1.59 
mldonkey/src/daemon/common/commonGlobals.ml:1.60
--- mldonkey/src/daemon/common/commonGlobals.ml:1.59    Wed Dec 14 21:17:46 2005
+++ mldonkey/src/daemon/common/commonGlobals.ml Sun Dec 18 14:50:38 2005
@@ -144,14 +144,6 @@
 let one_day = 3600. *. 24.
 let half_day = one_day /. 2.
 
-let printf_char c =
-  if !verbose then
-    (lprint_char c)
-
-let printf_string c =
-  if !verbose then
-    (lprint_string c)
-
 let minutes25 = 25 * 60
 
 let new_connection_control () = {
Index: mldonkey/src/daemon/common/commonInteractive.ml
diff -u mldonkey/src/daemon/common/commonInteractive.ml:1.58 
mldonkey/src/daemon/common/commonInteractive.ml:1.59
--- mldonkey/src/daemon/common/commonInteractive.ml:1.58        Wed Dec 14 
21:22:07 2005
+++ mldonkey/src/daemon/common/commonInteractive.ml     Sun Dec 18 14:50:38 2005
@@ -746,7 +746,7 @@
        !names
 
 let apply_on_fully_qualified_options name f =
-  if !verbose then lprintf_nl "[cInt]Change option %s" name;
+  if !verbose then lprintf_nl "[cInt] Change option %s" name;
   let rec iter prefix opfile =
     let args = simple_options prefix opfile in
     List.iter (fun o ->
@@ -769,7 +769,7 @@
               false
             with Exit -> true
         )) then begin
-        lprintf_nl "[cInt]Could not set option %s" name;
+        lprintf_nl "[cInt] Could not set option %s" name;
         raise Not_found
       end
   with Exit -> ()
Index: mldonkey/src/daemon/common/commonOptions.ml
diff -u mldonkey/src/daemon/common/commonOptions.ml:1.106 
mldonkey/src/daemon/common/commonOptions.ml:1.107
--- mldonkey/src/daemon/common/commonOptions.ml:1.106   Wed Dec 14 21:17:46 2005
+++ mldonkey/src/daemon/common/commonOptions.ml Sun Dec 18 14:50:38 2005
@@ -1466,7 +1466,6 @@
   file : debug file handling
   redir : debug redirector
   unexp : debug unexpected messages
-  hid : print hidden errors messages
 "
     string_option ""
 
@@ -1652,7 +1651,6 @@
 let verbose_files = ref false
 let verbose_redirector = ref false
 let verbose_unexpected_messages = ref false
-let verbose_hidden_errors = ref false
 
 let set_all v =
 
@@ -1681,8 +1679,7 @@
   verbose_torrent  := v;
   verbose_files := v;
   verbose_redirector := v;
-  verbose_unexpected_messages := v;
-  verbose_hidden_errors := v
+  verbose_unexpected_messages := v
 
 let _ =
   option_hook verbosity (fun _ ->
@@ -1718,7 +1715,6 @@
           | "file" -> verbose_files := true
           | "redir" -> verbose_redirector := true
           | "unexp" -> verbose_unexpected_messages := true
-          | "hid" -> verbose_hidden_errors := true
 
           | "all" ->
 
Index: mldonkey/src/daemon/common/commonSwarming2.ml
diff -u mldonkey/src/daemon/common/commonSwarming2.ml:1.23 
mldonkey/src/daemon/common/commonSwarming2.ml:1.24
--- mldonkey/src/daemon/common/commonSwarming2.ml:1.23  Wed Dec 14 21:17:46 2005
+++ mldonkey/src/daemon/common/commonSwarming2.ml       Sun Dec 18 14:50:38 2005
@@ -1087,24 +1087,29 @@
             let block_begin = t.t_block_size *.. i in
             let block_end = block_begin ++ t.t_block_size in
             let block_end = min block_end s.s_size in
-            if verify t chunks i block_begin block_end then begin
+            if verify t chunks i block_begin block_end then
+             begin
                 set_verified_chunk t i;
                 t.t_verified t.t_nverified_blocks i;
-
-              end else begin
-
-                if !verbose_swarming then
-                    lprintf_nl () "Block %d of %s is corrupted !!"
-                        i (file_best_name t.t_file);
+                if !verbose_swarming || !verbose then
+                 lprintf_nl () "Completed block %d/%d of %s"
+                    i t.t_nchunks (file_best_name t.t_file)
+              end
+           else
+             begin
+                if !verbose_swarming || !verbose then
+                    lprintf_nl () "Block %d/%d of %s is corrupted !!"
+                        i t.t_nchunks (file_best_name t.t_file);
                 t.t_ncomplete_blocks <- t.t_ncomplete_blocks - 1;
 
                 if List.for_all (fun i ->
                       s.s_verified_bitmap.[i] = '2'
-                  ) t.t_t2s_blocks.(i) then begin
-
-        if !verbose_hidden_errors then
-                    lprintf_nl () "Complete block %d of %s is corrupted (wrong 
hash), block is being resetted."
-                            i (file_best_name t.t_file);
+                  ) t.t_t2s_blocks.(i)
+               then
+                 begin
+                   if !verbose_swarming || !verbose then
+                      lprintf_nl () "Complete block %d/%d of %s failed 
verification, reloading..."
+                            i t.t_nchunks (file_best_name t.t_file);
 
                     t.t_converted_verified_bitmap.[i] <- '0';
 
@@ -1122,16 +1127,18 @@
 
                         | VerifiedBlock -> assert false
                     ) t.t_t2s_blocks.(i)
-                  end else begin
-                    let nsub = ref 0 in
-
-                    lprintf_n () "  Swarmer was incomplete: ";
-                    List.iter (fun i ->
-                        lprintf "%c" s.s_verified_bitmap.[i];
-                        if s.s_verified_bitmap.[i] = '2' then incr nsub;
-                    ) t.t_t2s_blocks.(i);
-                    lprintf_nl2 "   = %d/%d" !nsub (List.length 
t.t_t2s_blocks.(i));
-
+                  end
+               else
+                 begin
+                   if !verbose_swarming then begin
+                      let nsub = ref 0 in
+                        lprintf_n () "  Swarmer was incomplete: ";
+                        List.iter (fun i ->
+                          lprintf "%c" s.s_verified_bitmap.[i];
+                          if s.s_verified_bitmap.[i] = '2' then incr nsub;
+                        ) t.t_t2s_blocks.(i);
+                        lprintf_nl2 "   = %d/%d" !nsub (List.length 
t.t_t2s_blocks.(i))
+                   end;
                     t.t_converted_verified_bitmap.[i] <- '1'
                   end;
               end
@@ -2306,7 +2313,7 @@
                       string_pos < 0 ||
                       string_pos < string_begin ||
                       string_len < string_length then begin
-                        if !verbose_hidden_errors then
+                        if !verbose then
                         begin
                         lprintf_nl () "BAD WRITE in %s for range %Ld-%Ld 
(string_pos %d)"
                           (file_best_name t.t_file) r.range_begin r.range_end 
string_pos;
@@ -2772,7 +2779,7 @@
 *)
 
   if primary then begin
-      if !verbose then lprintf_nl () "Loading present...";
+      if !verbose_swarming then lprintf_nl () "Loading present...";
       let present = try
           let present =
             (get_value "file_present_chunks"
@@ -2785,7 +2792,7 @@
               (Printexc2.to_string e);
             []
       in
-      if !verbose then lprintf_nl () "Downloaded after present %Ld" 
(downloaded t);
+      if !verbose_swarming then lprintf_nl () "Downloaded after present %Ld" 
(downloaded t);
 
 (*
       if !verbose then lprintf_nl () "Loading absent...";
@@ -2802,7 +2809,7 @@
       (try
           let d = get_value "file_downloaded" value_to_int64 in
 
-          if d <> downloaded t && !verbose_hidden_errors then begin
+          if d <> downloaded t && !verbose then begin
               lprintf_nl () "ERROR: stored downloaded value not restored  !!! 
(%Ld/%Ld)" (downloaded t) d;
               lprintf_nl () "ERROR: present:";
               List.iter (fun (x,y) ->
Index: mldonkey/src/networks/bittorrent/bTClients.ml
diff -u mldonkey/src/networks/bittorrent/bTClients.ml:1.60 
mldonkey/src/networks/bittorrent/bTClients.ml:1.61
--- mldonkey/src/networks/bittorrent/bTClients.ml:1.60  Fri Dec 16 20:59:42 2005
+++ mldonkey/src/networks/bittorrent/bTClients.ml       Sun Dec 18 14:50:38 2005
@@ -747,7 +747,7 @@
         (client_num c) (Sha1.to_string c.client_uid) x y
 
   with Not_found ->
-        if not (Int64Swarmer.check_finished swarmer) && !verbose_hidden_errors 
then
+        if not (Int64Swarmer.check_finished swarmer) && !verbose then
           lprintf_nl () "BTClient.get_from_client ERROR: can't find a block to 
download and file is not yet finished for file : %s..." file.file_name
 
 
Index: mldonkey/src/networks/direct_connect/dcServers.ml
diff -u mldonkey/src/networks/direct_connect/dcServers.ml:1.13 
mldonkey/src/networks/direct_connect/dcServers.ml:1.14
--- mldonkey/src/networks/direct_connect/dcServers.ml:1.13      Tue May 17 
13:18:05 2005
+++ mldonkey/src/networks/direct_connect/dcServers.ml   Sun Dec 18 14:50:38 2005
@@ -443,7 +443,6 @@
                   try
                     connection_try s.server_connection_control;
                     incr nservers;
-                    printf_char 's'; 
                     
                     let sock = TcpBufferedSocket.connect token
                         "directconnect to server" 
Index: mldonkey/src/networks/donkey/donkeyClient.ml
diff -u mldonkey/src/networks/donkey/donkeyClient.ml:1.73 
mldonkey/src/networks/donkey/donkeyClient.ml:1.74
--- mldonkey/src/networks/donkey/donkeyClient.ml:1.73   Sat Dec 17 20:10:13 2005
+++ mldonkey/src/networks/donkey/donkeyClient.ml        Sun Dec 18 14:50:38 2005
@@ -55,9 +55,6 @@
 
 module Udp = DonkeyProtoUdp
 
-let full_client_identifier c =
-    Printf.sprintf "%s (%s) '%s'" (Ip.to_string c.client_ip) 
(brand_to_string_short c.client_brand) c.client_name
-
 (* prints a new logline with date, module and starts newline *)
 let lprintf_nl () =
   lprintf "%s[EDK] "
@@ -128,7 +125,7 @@
     let module M = DonkeyProtoClient in
     
     if !verbose then
-        lprintf_nl () "donkeyclient has been banned: %s %s" msg 
(full_client_identifier c);
+        lprintf_nl () "banned: %s %s" msg (full_client_identifier c);
     
     count_banned c;
     c.client_banned <- true;
@@ -162,7 +159,7 @@
               raise Exit;
             end;
           if !verbose then
-              lprintf_nl () "donkeyUploader has been warned: %s"
+              lprintf_nl () "warned, connecting too fast: %s"
                 (full_client_identifier c);
           if !!send_warning_messages then
             client_send c ( M.SayReq  (
@@ -247,23 +244,24 @@
       c.client_source.DonkeySources.source_sock <- NoConnection
   | Connection sock ->
       (try
+         let log_print cc =
+            lprintf_nl () "Client[%d] %s disconnected, connected %s%s%s"
+             (client_num cc)
+             (full_client_identifier cc)
+             (Date.time_to_string (last_time () - cc.client_connect_time) 
"verbose")
+             (if cc.client_uploaded > 0L then
+               Printf.sprintf ", send %s" (size_of_int64 cc.client_uploaded) 
else "")
+             (if cc.client_downloaded > 0L then
+               Printf.sprintf ", rec %s" (size_of_int64 cc.client_downloaded) 
else "")
+         in
+         if c.client_debug ||
+           (!verbose && (c.client_uploaded > 0L || c.client_downloaded > 0L)) 
then
+           log_print c;
+
           c.client_comp <- None;
-          if c.client_debug then begin
-            lprintf_nl () "Client[%d]: disconnected" (client_num c);
-          end;
           (try if c.client_checked then count_seen c with _ -> ());
           (try if !!log_clients_on_console && c.client_name <> "" then 
                 log_client_info c sock with _ -> ());
-          
-          (*
-          if c.client_connect_time > 0 then begin
-              lprintf "Disconnected %s\n" (string_of_client c);
-              lprintf "Client connected for %d seconds, %d requests issued\n"
-                (last_time () - c.client_connect_time)
-              c.client_requests_sent
-            end;
-*)
-          
           c.client_connect_time <- 0;
           (try Hashtbl.remove connected_clients c.client_md4 with _ -> ());
           (try CommonUploads.remove_pending_slot (as_client c) with _ -> ());
@@ -383,9 +381,8 @@
                       | Reliability_suspicious _ -> ()
                   ) group.group;
                   if !list <> [] then begin
-                      if !verbose_sources > 2 then begin
+                      if !verbose_sources > 2 then
                           lprintf_nl () "Send %d sources from file groups to 
mldonkey peer" (List.length !list); 
-                        end;
                       let msg = 
                         let module Q = DonkeyProtoClient.Sources in
                         DonkeyProtoClient.SourcesReq {
@@ -773,7 +770,6 @@
             Q.id = id;
           }) *)
     | Connection sock ->
-        printf_string "[QUERY ID]";
         server_send sock (
           let module M = DonkeyProtoServer in
           let module C = M.QueryID in
@@ -1301,9 +1297,8 @@
       begin
         match c.client_download with
         | Some (file,up) -> 
-            if !verbose_download then begin
+            if !verbose_download then
                 lprintf_nl () "Clear download";
-              end;
             Int64Swarmer.clear_uploader_ranges up;
             c.client_download <- None
         | None ->
@@ -1379,21 +1374,19 @@
           client_enter_upload_queue cc
         end else *)
       CommonUploads.add_pending_slot (as_client c);
-      if !verbose then
+      if !verbose_upload then
           lprintf_nl () "donkeyClient: uploader couldn't get a slot: %s"
             (full_client_identifier c);
 (*      end *)
   
   | M.CloseSlotReq _ ->
       set_client_state c (Connected 0);
-      printf_string "[DOWN]";
       begin
         match c.client_download with
           None -> ()
         | Some (file,up) ->
-            if !verbose_download then begin
+            if !verbose_download then
                 lprintf_nl () "Slot closed during download";
-              end;
             Int64Swarmer.clear_uploader_ranges up
       end;
 (*      DonkeyOneFile.clean_current_download c; *)
@@ -1403,9 +1396,8 @@
         match c.client_file_queue with
           [] -> ()
         | _ -> 
-            if !verbose_download then begin
+            if !verbose_download then
                 lprintf_nl () "CloseSlotReq"; 
-              end;
             DonkeyOneFile.request_slot c;
             set_rtimeout sock !!queued_timeout;
       end
@@ -1421,9 +1413,6 @@
       begin
         try
           let file = find_file t.Q.md4 in
-          let s = Printf.sprintf "[FOUND FILE(%s)]" (match c.client_kind with
-                Direct_address _ -> "OUT" | _ -> "IN") in
-          printf_string s;
           c.client_rating <- c.client_rating + 1;
           
           client_has_file c file;
@@ -1476,16 +1465,14 @@
         let file = find_file t.Q.md4 in
         
         let module Q = M.QueryChunkMd4Reply in
-        if !verbose then begin
-            lprintf_nl () "MD4 FOR CHUNKS RECEIVED";
-          end;
+        if !verbose then
+            lprintf_nl () "Received chunks md4 for %s from %s"
+                (file_best_name file) (full_client_identifier c);
         
-        if file.file_computed_md4s <> [||] then begin
-            if !verbose_hidden_errors then
-              lprintf_nl () "[WARNING] Discarding Chunks Md4: already here";
-          end else
+        if file.file_computed_md4s = [||] then begin
         if file.file_nchunks = 1 then begin
-            lprintf_nl () "[ERROR]: one chunk file without md4";
+            lprintf_nl () "[ERROR] file %s has only one chunk, ignoring 
QueryChunkMd4ReplyReq"
+             (file_best_name file);
             file.file_computed_md4s <- [|file.file_md4|];
             match file.file_swarmer with
               None -> ()
@@ -1493,12 +1480,19 @@
                 Int64Swarmer.set_verifier swarmer 
                   (Verification [| Ed2k file.file_md4 |])
           end else
-        if t.Q.chunks = [||] then begin
-            lprintf_nl () "[ERROR]: empty multiple chunks message";
-          end
+        if t.Q.chunks = [||] then
+            lprintf_nl () "[ERROR] received empty chunks md4 message for %s 
from %s"
+             (file_best_name file) (full_client_identifier c)
         else
         if Array.length t.Q.chunks <> file.file_nchunks then begin
-            if !verbose then lprintf_nl () "BAD BAD BAD (2): number of chunks 
is different %d/%d for %s:%Ld on peer" (Array.length t.Q.chunks) 
file.file_nchunks (Md4.to_string file.file_md4) (file_size file);
+            if !verbose then
+             lprintf_nl () "[ERROR] number of chunks does not match, received 
md4s %d/should be %d, for %s(%s):%Ld bytes from %s"
+               (Array.length t.Q.chunks)
+               file.file_nchunks
+               (file_best_name file)
+               (Md4.to_string file.file_md4)
+               (file_size file)
+               (full_client_identifier c)
 (* What should we do ?
 
 1) Try to recover the correct size of the file: we can use 
@@ -1517,7 +1511,8 @@
             let md4s = t.Q.chunks in
             let md4 = DonkeyShare.md4_of_array md4s in
             if md4 <> file.file_md4 then begin
-                lprintf_nl () "[ERROR]: Bad list of MD4s, discarding";
+                lprintf_nl () "[ERROR] Chunks md4s do not match file_md4 for 
%s(%s) from %s"
+                 (file_best_name file) (Md4.to_string file.file_md4) 
(full_client_identifier c);
               end else begin
                 file.file_computed_md4s <- md4s;
                 match file.file_swarmer with
@@ -1527,8 +1522,7 @@
                       (Verification (Array.map (fun m -> Ed2k m) md4s))
 
               end
-          
-          
+            end
           end
 (*      if file.file_exists then verify_chunks file *)
       end
@@ -1579,7 +1573,7 @@
           let pos = iter comp.comp_blocs in
           assert (pos = comp.comp_len);
             let s = Autoconf.zlib__uncompress_string2 s in
-            if !verbose then
+            if !verbose_download then
         lprintf_nl () "Decompressed: %d/%d" (String.length s) comp.comp_len;
             
             DonkeyOneFile.block_received c comp.comp_md4
@@ -1588,7 +1582,7 @@
           c.client_comp <- None;
         end else
       if comp.comp_len > comp.comp_total then begin
-          if !verbose_hidden_errors then
+          if !verbose_unknown_messages then
             lprintf_nl () "ERROR: more data than compressed!";
           c.client_comp <- None;
         end
@@ -1690,21 +1684,14 @@
       DonkeySources.query_files c.client_source
         
         with Not_found -> 
+            client_send c (M.NoSuchFileReq md4);
             if !verbose_unexpected_messages then
-              lprintf_nl () "donkeyClient: QueryFileReq: Client %s queried 
unpublished file %s" (full_client_identifier c) (Md4.to_string md4);
-            client_send c (
-              M.NoSuchFileReq md4);
-            
-           if !verbose then begin
-            lprintf_nl () "DUMPING File table";
-            Hashtbl.iter (fun md4 _ ->
-                lprintf_nl () "    %s" (Md4.to_string md4)
-                ) files_by_md4;
-     end
+              lprintf_nl () "donkeyClient: QueryFileReq: Client %s queried 
unpublished file %s"
+               (full_client_identifier c) (Md4.to_string md4)
         | e -> 
             lprintf_nl () "Exception %s in QueryFileReq"
               (Printexc.to_string e)
-      end;
+      end
 
   | M.EmuleSignatureReq t ->
       if !!enable_sui then 
@@ -1802,8 +1789,8 @@
               1 -> (1,"SIGNNEEDED") 
             | 2 -> (2,"KEYANDSIGNNEEDED") 
             | e -> (e,"UNKNOWN")) in
-          lprintf_nl () "%s [ESecIdentStateReq] [type: %d (%s)] [reqChall: 
%Ld] [sendChall: %Ld] [hasKey: %s]" 
-            (full_client_identifier c) lstate lstateString t.Q.challenge 
c.client_sent_challenge (if has_pubkey c then "true" else "false");
+          lprintf_nl () "%s [ESecIdentStateReq] [type: %d (%s)] [reqChall: 
%Ld] [sendChall: %Ld] [hasKey: %b]" 
+            (full_client_identifier c) lstate lstateString t.Q.challenge 
c.client_sent_challenge (has_pubkey c);
         end;
 
         c.client_req_challenge <- t.Q.challenge;
@@ -1957,7 +1944,7 @@
   | M.QueryBlocReq t when !CommonUploads.has_upload = 0 &&
     client_has_a_slot (as_client c) ->
       
-      if !verbose then
+      if !verbose_upload then
           lprintf_nl () "donkeyClient: uploader %s ask for block" 
(full_client_identifier c);
       
       let module Q = M.QueryBloc in
@@ -2042,7 +2029,6 @@
       disconnect_client c s;
 
   | BASIC_EVENT (LTIMEOUT | RTIMEOUT) ->
-      printf_string "[TO?]";
       close sock Closed_for_timeout;
 
       (*
@@ -2062,11 +2048,7 @@
     Some c -> client_handler c sock event
   | None ->
       match event with
-        BASIC_EVENT (CLOSED s) ->
-          printf_string "-c";
-      
-      | BASIC_EVENT (LTIMEOUT | RTIMEOUT) ->
-          printf_string "[TO?]";
+        BASIC_EVENT (LTIMEOUT | RTIMEOUT) ->
           close sock Closed_for_timeout
           
       | _ -> ()
@@ -2267,7 +2249,7 @@
       None
   
   | _ -> 
-      if !verbose_hidden_errors then
+      if !verbose_unknown_messages then
         begin
           lprintf_nl () "BAD MESSAGE FROM CONNECTING CLIENT with ip:%s port:%i 
overnet:%b"
             (Ip.to_string (peer_ip sock)) (peer_port sock) overnet;
@@ -2298,7 +2280,6 @@
                       set_client_state c Connecting;
 (*                  connection_try c.client_connection_control; *)
                       
-                      printf_string "?C";
                       let sock = TcpBufferedSocket.connect token "donkey to 
client" 
                           (Ip.to_inet_addr ip)
                         port 
Index: mldonkey/src/networks/donkey/donkeyComplexOptions.ml
diff -u mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.39 
mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.40
--- mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.39   Sat Dec 17 
20:10:13 2005
+++ mldonkey/src/networks/donkey/donkeyComplexOptions.ml        Sun Dec 18 
14:50:38 2005
@@ -582,7 +582,6 @@
     DonkeyGlobals.find_server ip port
   with _ ->
       let s = DonkeyGlobals.new_server ip port !!initial_score in
-      DonkeyGlobals.servers_ini_changed := true;
       s        
       
 let check_add_server ip port =
@@ -597,13 +596,11 @@
     try
       ignore (DonkeyGlobals.find_server ip port)
     with _ ->
-        let _ = DonkeyGlobals.new_server ip port !!initial_score in
-        DonkeyGlobals.servers_ini_changed := true
+        ignore (DonkeyGlobals.new_server ip port !!initial_score)
         
 let remove_server ip port =
   try
     let _ = DonkeyGlobals.find_server ip port in
-    DonkeyGlobals.servers_ini_changed := true;
     DonkeyGlobals.remove_server ip port
   with _ -> ()
 
Index: mldonkey/src/networks/donkey/donkeyFiles.ml
diff -u mldonkey/src/networks/donkey/donkeyFiles.ml:1.17 
mldonkey/src/networks/donkey/donkeyFiles.ml:1.18
--- mldonkey/src/networks/donkey/donkeyFiles.ml:1.17    Sat Dec 17 20:14:38 2005
+++ mldonkey/src/networks/donkey/donkeyFiles.ml Sun Dec 18 14:50:38 2005
@@ -46,8 +46,16 @@
 open CommonGlobals
 open DonkeyStats
 
-let verbose_upload = false
-      
+(* prints a new logline with date, module and starts newline *)
+let lprintf_nl () =
+  lprintf "%s[EDK] "
+    (log_time ()); lprintf_nl2
+
+(* prints a new logline with date, module and does not start newline *)
+let lprintf_n () =
+  lprintf "%s[EDK] "
+    (log_time ()); lprintf
+
 let msg_block_size_int = 10240
 let msg_block_size = Int64.of_int msg_block_size_int
 let upload_buffer = String.create msg_block_size_int
@@ -80,11 +88,10 @@
 (*      lprintf "send_small_block %d\n" len_int; *)
 (*      let len_int = Int32.to_int len in *)
       try
-        if !verbose then begin
-            lprintf "send_small_block(%s-%s) %Ld %d "
-              c.client_name (brand_to_string c.client_brand)
+       if !verbose_upload then
+         lprintf_nl () "send_small_block (%s) %Ld %d"
+           (full_client_identifier c)
             (begin_pos) (len_int);
-          end;
         
         let msg =  
           (
@@ -113,15 +120,11 @@
               shared_must_update_downloaded (as_shared impl);
               impl.impl_shared_uploaded <- 
                 impl.impl_shared_uploaded ++ uploaded);
-        if c.client_connected then
-          printf_string "U[OUT]\n"
-        else
-          printf_string "U[IN]\n";
         
         write_string sock upload_buffer;
         check_end_upload c sock
       with e -> 
-          if !verbose_hidden_errors then lprintf "Exception %s in 
send_small_block\n" (Printexc2.to_string e)
+          if !verbose then lprintf_nl () "Exception %s in send_small_block" 
(Printexc2.to_string e)
     
     let rec send_client_block c sock per_client =
 (*      lprintf "send_client_block\n"; *)
@@ -138,17 +141,15 @@
             if max_len <= msg_block_size_int then
 (* last block from chunk *)
               begin
-                if verbose_upload then begin
-                    lprintf "END OF CHUNK (%d) %Ld\n" max_len up.up_end_chunk; 
-                  end;
+                if !verbose_upload then
+                    lprintf_nl () "END OF CHUNK (%d) %Ld" max_len 
up.up_end_chunk; 
                 send_small_block c sock up.up_file up.up_pos max_len;
                 up.up_chunks <- chunks;
                 let per_client = per_client - max_len in
                 match chunks with
                   [] -> 
-                    if verbose_upload then begin
-                        lprintf "NO CHUNKS\n"; 
-                      end;
+                    if !verbose_upload then
+                        lprintf_nl () "NO CHUNKS";
                     c.client_upload <- None;
                 | (begin_pos, end_pos) :: _ ->
                     up.up_pos <- begin_pos;
Index: mldonkey/src/networks/donkey/donkeyGlobals.ml
diff -u mldonkey/src/networks/donkey/donkeyGlobals.ml:1.62 
mldonkey/src/networks/donkey/donkeyGlobals.ml:1.63
--- mldonkey/src/networks/donkey/donkeyGlobals.ml:1.62  Sat Dec 17 20:10:13 2005
+++ mldonkey/src/networks/donkey/donkeyGlobals.ml       Sun Dec 18 14:50:38 2005
@@ -157,7 +157,6 @@
 let udp_sock = ref (None: UdpSocket.t option)
 let listen_sock = ref (None : TcpServerSocket.t option)
 let reversed_sock = ref (None : TcpServerSocket.t option)
-let servers_ini_changed = ref true
 let new_shared = ref false
 
 (*************************************************************************)
@@ -780,7 +779,7 @@
   Printf.bprintf buf "  udp_servers_list: %d\n" (List.length 
!udp_servers_list);
   Printf.bprintf buf "  interesting_clients: %d\n" (List.length 
!interesting_clients);
   Printf.bprintf buf "  shared_files: %d\n" (List.length !shared_files);
-  Printf.bprintf buf "  new_hsared_files: %d\n" (List.length 
!new_shared_files);
+  Printf.bprintf buf "  new_shared_files: %d\n" (List.length 
!new_shared_files);
   Printf.bprintf buf "  servers_by_key: %d\n" (Hashtbl.length servers_by_key);
   Printf.bprintf buf "  banned_ips: %d\n" (Hashtbl.length banned_ips);
   Printf.bprintf buf "  old_requests: %d\n" (Hashtbl.length old_requests);
@@ -968,3 +967,9 @@
 let server_send_getsources2 s =
   (s.server_flags land DonkeyProtoUdp.PingServerReplyUdp.getsources2) <> 0
 
+let full_client_identifier c =
+    Printf.sprintf "%s (%s%s) '%s'"
+      (Ip.to_string c.client_ip)
+      (brand_to_string_short c.client_brand)
+      (if c.client_emule_proto.emule_release = "" then "" else " " ^ 
c.client_emule_proto.emule_release)
+      (String.escaped c.client_name)
Index: mldonkey/src/networks/donkey/donkeyIndexer.ml
diff -u mldonkey/src/networks/donkey/donkeyIndexer.ml:1.6 
mldonkey/src/networks/donkey/donkeyIndexer.ml:1.7
--- mldonkey/src/networks/donkey/donkeyIndexer.ml:1.6   Tue Sep  6 11:24:59 2005
+++ mldonkey/src/networks/donkey/donkeyIndexer.ml       Sun Dec 18 14:50:38 2005
@@ -178,9 +178,7 @@
   *)
 
 let input_old_result ic = 
-  printf_char '<';
   let hresult = Pervasives.input_value ic in
-  printf_char '>';
   
   let o = Obj.repr hresult in
   lprintf "Type int: %s\n" (string_of_bool (Obj.is_int o));
@@ -198,7 +196,6 @@
       result_comment = "";
       result_done = false;
     } in
-  printf_char '!';
   List.iter (fun tag ->
       match tag with
         { tag_name = "format"; tag_value = String s } ->
@@ -523,7 +520,6 @@
   let ic = open_in "history.dat" in
   try
     while true do
-      printf_char '.';
       ignore (index_result_no_filter (input_old_result ic))
     done
   with _ -> close_in ic
Index: mldonkey/src/networks/donkey/donkeyInteractive.ml
diff -u mldonkey/src/networks/donkey/donkeyInteractive.ml:1.76 
mldonkey/src/networks/donkey/donkeyInteractive.ml:1.77
--- mldonkey/src/networks/donkey/donkeyInteractive.ml:1.76      Fri Dec 16 
20:56:31 2005
+++ mldonkey/src/networks/donkey/donkeyInteractive.ml   Sun Dec 18 14:50:38 2005
@@ -72,7 +72,6 @@
 
 
 let op_file_proposed_filenames file =
-  if !verbose then lprintf_nl () "op_file_proposed_filenames";
   List2.tail_map fst file.file_filenames
 
 let reconnect_all file =
@@ -254,6 +253,9 @@
             Int64Swarmer.set_absent swarmer absents
   end;
 
+  if !verbose then lprintf_nl () "Started new download, file %s, size %Ld, md4 
%s"
+    (file_best_name file) size (Md4.to_string md4);
+
   DonkeyProtoOvernet.Overnet.recover_file file;
   DonkeyProtoKademlia.Kademlia.recover_file file;
 
Index: mldonkey/src/networks/donkey/donkeyMain.ml
diff -u mldonkey/src/networks/donkey/donkeyMain.ml:1.41 
mldonkey/src/networks/donkey/donkeyMain.ml:1.42
--- mldonkey/src/networks/donkey/donkeyMain.ml:1.41     Wed Dec 14 21:23:30 2005
+++ mldonkey/src/networks/donkey/donkeyMain.ml  Sun Dec 18 14:50:38 2005
@@ -81,9 +81,14 @@
             (Printexc2.to_string e)
   )
 
-let halfmin_timer timer =
+let min_timer timer =
   DonkeySources.clean_sources (); (* Moved here from fivemin_timer. *)
-  DonkeyServers.update_master_servers ()
+  DonkeyServers.update_master_servers ();
+ (try
+      DonkeyServers.query_locations_timer ();
+    with _ -> ());
+  (List.iter (fun file -> DonkeyShare.must_share_file file) !new_shared_files;
+  new_shared_files := [])
 (*  DonkeyIndexer.add_to_local_index_timer () *)
 
 
@@ -310,18 +315,10 @@
       add_session_timer enabler 1.0 DonkeyServers.udp_walker_timer;
       
       add_session_timer enabler 3600. hourly_timer;
-      add_session_timer enabler 30. halfmin_timer;
+      add_session_timer enabler 60. min_timer;
       add_session_timer enabler 300. fivemin_timer;
       add_session_timer enabler 900. quarter_timer;
       add_session_timer enabler 1. second_timer;
-      add_session_timer enabler 60. (fun _ ->
-          (try
-              DonkeyServers.query_locations_timer ();
-            with _ -> ());
-          List.iter (fun file -> DonkeyShare.must_share_file file) 
-          !new_shared_files;  
-          new_shared_files := [];
-      );
       add_session_option_timer enabler remove_old_servers_delay 
           DonkeyServers.remove_old_servers;
 
Index: mldonkey/src/networks/donkey/donkeyOneFile.ml
diff -u mldonkey/src/networks/donkey/donkeyOneFile.ml:1.33 
mldonkey/src/networks/donkey/donkeyOneFile.ml:1.34
--- mldonkey/src/networks/donkey/donkeyOneFile.ml:1.33  Wed Dec 14 21:23:30 2005
+++ mldonkey/src/networks/donkey/donkeyOneFile.ml       Sun Dec 18 14:50:38 2005
@@ -415,13 +415,17 @@
     
   match c.client_download with
     None -> 
-      if !verbose_hidden_errors then
-        lprintf_nl ()"block_received: block received but no file !, received: 
%s" (Md4.to_string md4)
+      if !verbose then
+        lprintf_nl ()"block_received for unknown file (md4 %s) for data from 
%s"
+         (Md4.to_string md4) (full_client_identifier c)
   | Some (file, up) ->
       
       if file.file_md4 <> md4 then begin
-          if !verbose_hidden_errors then
-            lprintf_nl () "block_received: block for bad file, received: %s, 
expected: %s" (Md4.to_string md4) (Md4.to_string file.file_md4)
+          if !verbose then
+            lprintf_nl () "block_received for wrong file, received: %s, 
expected: %s, from %s"
+             (Md4.to_string md4)
+             (Md4.to_string file.file_md4)
+             (full_client_identifier c)
         end else begin
           DonkeySources.set_request_result c.client_source file.file_sources 
File_upload;
           
Index: mldonkey/src/networks/donkey/donkeyOptions.ml
diff -u mldonkey/src/networks/donkey/donkeyOptions.ml:1.33 
mldonkey/src/networks/donkey/donkeyOptions.ml:1.34
--- mldonkey/src/networks/donkey/donkeyOptions.ml:1.33  Sat Nov  5 16:23:40 2005
+++ mldonkey/src/networks/donkey/donkeyOptions.ml       Sun Dec 18 14:50:38 2005
@@ -51,8 +51,6 @@
     "The number of UDP packets you send every check_client_connections_delay"
   int_option 10
 
-let max_server_age = define_expert_option donkey_section ["max_server_age"] 
"max number of days after which an unconnected server is removed" int_option 2
-
 let reliable_sources = define_option donkey_section ["reliable_sources"]
     "Should mldonkey try to detect sources responsible for corruption and ban 
them" bool_option true
 
@@ -228,8 +226,10 @@
   over other networks, where upload is less efficient, without preventing
   upload from these networks." int_option 5
 
+let max_server_age = define_expert_option donkey_section ["max_server_age"] 
"max number of days after which an unconnected server is removed" int_option 2
+
 let remove_old_servers_delay = define_expert_option donkey_section 
["remove_old_servers_delay"]
-  "How often should remove old donkey be called (in seconds, 0 to disable)"
+  "How often should remove old donkey servers (see max_server_age) be called 
(in seconds, 0 to disable)"
     float_option 900.
 
 let min_left_servers = define_expert_option donkey_section ["min_left_servers"]
Index: mldonkey/src/networks/donkey/donkeyProtoClient.ml
diff -u mldonkey/src/networks/donkey/donkeyProtoClient.ml:1.32 
mldonkey/src/networks/donkey/donkeyProtoClient.ml:1.33
--- mldonkey/src/networks/donkey/donkeyProtoClient.ml:1.32      Thu Dec 15 
19:41:46 2005
+++ mldonkey/src/networks/donkey/donkeyProtoClient.ml   Sun Dec 18 14:50:38 2005
@@ -1173,7 +1173,7 @@
 
     | 0x93 (* 147 *) ->
         if String.length s < 16 then begin
-          if !verbose then lprintf_nl "EmuleMultiPacketAnswer: incomplete 
request";
+          if !verbose_unknown_messages then lprintf_nl 
"EmuleMultiPacketAnswer: incomplete request";
           raise Not_found
         end;
         let md4 = get_md4 s 1 in
Index: mldonkey/src/networks/donkey/donkeyProtoCom.ml
diff -u mldonkey/src/networks/donkey/donkeyProtoCom.ml:1.24 
mldonkey/src/networks/donkey/donkeyProtoCom.ml:1.25
--- mldonkey/src/networks/donkey/donkeyProtoCom.ml:1.24 Thu Oct  6 14:03:05 2005
+++ mldonkey/src/networks/donkey/donkeyProtoCom.ml      Sun Dec 18 14:50:38 2005
@@ -124,7 +124,6 @@
   let msgs = ref 0 in
   fun sock nread ->
 
-    if !verbose then lprintf_nl () "between clients %d" nread;
     let module M= DonkeyProtoClient in
     let b = TcpBufferedSocket.buf sock in
     try
@@ -133,7 +132,6 @@
         let msg_len = get_int b.buf (b.pos+1) in
         if b.len >= 5 + msg_len then
           begin
-            if !verbose then lprintf_nl () "client_to_client";
             let s = String.sub b.buf (b.pos+5) msg_len in
             buf_used b  (msg_len + 5);
             let t = M.parse emule_version opcode s in
@@ -150,7 +148,6 @@
     with Not_found -> ()
 
 let cut_messages parse f sock nread =
-  if !verbose then lprintf_nl () "server to client %d" nread;
   let b = TcpBufferedSocket.buf sock in
   try
     while b.len >= 5 do
@@ -158,7 +155,6 @@
       let msg_len = get_int b.buf (b.pos+1) in
       if b.len >= 5 + msg_len then
         begin
-          if !verbose then lprintf_nl () "server_to_client";
           let s = String.sub b.buf (b.pos+5) msg_len in
           buf_used b (msg_len + 5);
           let t = parse opcode s in
@@ -237,7 +233,7 @@
       let name = if String2.starts_with name "hidden." then
           String.sub name 7 (String.length name - 7)
         else name in
-      if !verbose then lprintf_nl () "Sharing %s" name;
+      if !verbose_share then lprintf_nl () "tag_file: Sharing %s" name;
       name
     ))::
   (int64_tag Field_Size file.file_file.impl_file_size) ::
@@ -246,8 +242,7 @@
         FormatNotComputed next_time when
         next_time < last_time () ->
           (try
-              if !verbose then lprintf_nl () "%s: Find format %s"
-                    (string_of_date (last_time ()))
+              if !verbose_share then lprintf_nl () "Find format %s"
                   (file_disk_name file);
               file.file_format <- (
                 match
@@ -330,8 +325,6 @@
     make_tagged sock files
 
 let server_send_share compressed sock msg =
-  if !verbose then
-      lprintf_nl () "Sending %d file(s) to server" (List.length msg);
   let max_len =
     !!client_buffer_size - 100
       - TcpBufferedSocket.remaining_to_write sock
@@ -347,8 +340,8 @@
       let s = Buffer.contents buf in
       str_int s 0 nfiles;
       let s = String.sub s 0 prev_len in
-      if !verbose_share then
-         lprintf_nl () "Sending %d share(s) to server : " nfiles;
+      if !verbose_share || !verbose then
+         lprintf_nl () "Sending %d share(s) to server" nfiles;
       Buffer.reset buf;
       let s_c =
         if compressed then
@@ -360,8 +353,6 @@
          is smaller in that state. *)
       if compressed && ((String.length s_c) < (String.length s))  then
         begin
-          if !verbose_share then
-            lprintf_nl () "Using zlib";
           buf_int8 buf 0xD4;
           buf_int buf 0;
           buf_int8 buf 21; (* ShareReq *)
@@ -370,8 +361,6 @@
         end
       else
         begin
-          if !verbose_share then
-            lprintf_nl () "No compression";
           buf_int8 buf 227;
           buf_int buf 0;
           buf_int8 buf 21; (* ShareReq *)
Index: mldonkey/src/networks/donkey/donkeyProtoOvernet.ml
diff -u mldonkey/src/networks/donkey/donkeyProtoOvernet.ml:1.26 
mldonkey/src/networks/donkey/donkeyProtoOvernet.ml:1.27
--- mldonkey/src/networks/donkey/donkeyProtoOvernet.ml:1.26     Sat Dec 17 
20:14:38 2005
+++ mldonkey/src/networks/donkey/donkeyProtoOvernet.ml  Sun Dec 18 14:50:38 2005
@@ -366,7 +366,7 @@
               end;
             OvernetUnknown (opcode, s)
       with e ->
-          if !verbose_hidden_errors then
+          if !verbose_unknown_messages then
             begin
               lprintf_nl () "Error %s while parsing opcode %d" 
(Printexc2.to_string e) opcode;
               dump s;
Index: mldonkey/src/networks/donkey/donkeyServers.ml
diff -u mldonkey/src/networks/donkey/donkeyServers.ml:1.45 
mldonkey/src/networks/donkey/donkeyServers.ml:1.46
--- mldonkey/src/networks/donkey/donkeyServers.ml:1.45  Tue Oct 11 17:26:15 2005
+++ mldonkey/src/networks/donkey/donkeyServers.ml       Sun Dec 18 14:50:38 2005
@@ -47,9 +47,15 @@
 
 module Udp = DonkeyProtoUdp
 
+(* prints a new logline with date, module and starts newline *)
 let lprintf_nl () =
   lprintf "%s[EDK] "
-  (log_time ()); lprintf_nl2
+    (log_time ()); lprintf_nl2
+
+(* prints a new logline with date, module and does not start newline *)
+let lprintf_n () =
+  lprintf "%s[EDK] "
+    (log_time ()); lprintf
 
 (* Constants *)
 let udp_requests_new  = 5
@@ -302,12 +308,17 @@
         lprintf_nl () "%s" msg
 
   | M.ServerListReq l ->
-      if !verbose then lprintf_nl () "donkeyServers: Received serverlist";
-      if !!update_server_list_server then
+      if !!update_server_list_server then begin
+        if !verbose_msg_servers then lprintf_nl () "Received serverlist from 
server";
         let module Q = M.ServerList in
         List.iter (fun s ->
             safe_add_server s.Q.ip s.Q.port
         ) l
+        end
+      else begin
+        if !verbose_msg_servers then lprintf_nl () "Ignored serverlist from 
server"
+        end
+
 
   | M.ServerInfoReq t ->
       s.server_score <- s.server_score + 1;
@@ -321,7 +332,6 @@
                 s.server_description <- desc
             | _ -> ()
       ) s.server_tags;
-      printf_char 'S';
 
       (* nice and ugly, but it doesn't require any new fields *)
       set_server_state s (Connected
@@ -469,7 +479,6 @@
               try
                 (* lprintf "CONNECTING ONE SERVER\n"; *)
                 connection_try s.server_connection_control;
-                printf_char 's';
                 let sock = TcpBufferedSocket.connect token "donkey to server"
                     (Ip.to_inet_addr s.server_ip) s.server_port
                     (server_handler s) (* 
DonkeyProtoCom.server_msg_to_string*)  in
@@ -585,8 +594,11 @@
  * clean serverlist
  *)
 let remove_old_servers () =
-  if !verbose then lprintf_nl () "REMOVE OLD SERVERS";
-  let t1 = Unix.gettimeofday () in
+  if last_time () - start_time > !!max_server_age * Date.day_in_secs then begin
+  
+  if !verbose then
+    lprintf_nl () "old servers: Start check, remove servers not connected for 
%d days"
+      !!max_server_age;
 (*
 The new tactic: we sort the servers (the more recently connected first,
 the black-listed ones at the end), and we start checking from the last
@@ -605,8 +617,6 @@
             to_keep :=
               (connection_last_conn s.server_connection_control, s) :: !to_keep
   ) servers_by_key;
-  let t2 = Unix.gettimeofday () in
-  if !verbose then lprintf_nl () "Delay to detect black-listed servers: %2.2f" 
(t2 -. t1);
 
   if List.length !to_keep > !!min_left_servers then begin
     let array = Array.of_list !to_keep in
@@ -616,7 +626,7 @@
 
     if !verbose then
       Array.iteri (fun i (ls, s) ->
-        lprintf_nl () "server %d last_conn %d" (server_num s) ls) array;
+        lprintf_nl () "old servers: server %d last_conn %d" (server_num s) ls) 
array;
 
     let min_last_conn =  last_time () - !!max_server_age * Date.day_in_secs in
 
@@ -625,7 +635,7 @@
         if ls < min_last_conn && s.server_sock = NoConnection
           && not s.server_preferred then begin
           if !verbose then
-            lprintf_nl () "Server too old: %s:%d"
+            lprintf_nl () "old servers: Server too old: %s:%d"
               (Ip.to_string s.server_ip) s.server_port;
 
           to_remove := s :: !to_remove
@@ -633,18 +643,15 @@
     done
   end;
 
-  let t3 = Unix.gettimeofday () in
-  if !verbose then lprintf_nl () "Delay to detect old servers: %2.2f" (t3 -. 
t2);
-
   List.iter (fun s ->
     remove_server s.server_ip s.server_port
   ) !to_remove;
 
-  let t4 = Unix.gettimeofday () in
-  if !verbose then lprintf_nl () "Delay to finally remove servers: %2.2f" (t4 
-. t3);
   if !to_remove <> [] || !verbose then
     lprintf_nl () "Removed %d old edonkey servers." (List.length !to_remove)
 
+  end
+
 
 (* Keep connecting to servers in the background. Don't stay connected to
   them , and don't send your shared files list *)
@@ -735,29 +742,36 @@
 
 (* check connected servers *)
 let update_master_servers _ =
+  if !verbose then
+    lprintf_nl () "master servers: start re-computing";
   let server_list = List.sort compare_servers (connected_servers ()) in
   let masters = ref [] in
+  let tag1 = ref true in
   List.iter (
+    let tag2 = ref true in
     fun s ->
       if s.server_master then
         match s.server_sock with
         | Connection _ ->
             if !verbose then begin
-                lprintf_nl () "MASTER: OLD MASTER %s" (Ip.to_string 
s.server_ip);
-              end;
+             if !tag2 then begin
+                lprintf_n () "master servers (old):";
+               tag1 := false;
+               tag2 := false
+             end;
+             lprintf " %s" (Ip.to_string s.server_ip)
+           end;
             masters := s :: !masters
         | _ -> s.server_master <- false
   ) server_list;
+  if not !tag1 then lprint_newline ();
   let nmasters = ref (List.length !masters) in
 
-  if !verbose then
-    lprintf_nl () "MASTER: nmaster %d" !nmasters;
-
   let make_master s =
     (* normal servers don't have our SHARE, so send list if it becomes a 
master *)
     do_if_connected s.server_sock (fun sock ->
         if !verbose then
-          lprintf_nl () "   MASTER: %s" (Ip.to_string s.server_ip);
+          lprintf_nl () "master servers: new master: %s, sending shared files" 
(Ip.to_string s.server_ip);
         s.server_master <- true;
         incr nmasters;
 
@@ -779,7 +793,7 @@
     if !nconnected_servers > max_allowed_connected_servers then
       begin
         if !verbose then
-            lprintf_nl () "MASTER: DISCONNECT %s" (Ip.to_string s.server_ip);
+            lprintf_nl () "master servers: disconnect %s" (Ip.to_string 
s.server_ip);
         nconnected_servers := !nconnected_servers - 3;
         do_if_connected  s.server_sock (fun sock ->
             (* We will disconnect from this server.
@@ -798,7 +812,8 @@
             - connection_last_conn s.server_connection_control
           in
           if !verbose then
-              lprintf_nl () "MASTER: Checking ip:%s ct:%d" (Ip.to_string 
s.server_ip) connection_time;
+              lprintf_nl () "master servers: Checking ip:%s, users: %Ld, ct:%d"
+               (Ip.to_string s.server_ip) s.server_nusers connection_time;
           if not s.server_master
             && (s.server_preferred
                  || connection_time > !!become_master_delay
@@ -809,8 +824,8 @@
                 if (!nmasters < max_allowed_connected_servers) then
                   begin
                     if !verbose then
-                        lprintf_nl () "   MASTER: RAISING %s (%Ld)"
-                                  (Ip.to_string s.server_ip) s.server_nusers;
+                        lprintf_nl () "master servers: raising  %s"
+                                  (Ip.to_string s.server_ip);
                     make_master s
                   end
                 else if s.server_sent_all_queries then
@@ -829,9 +844,8 @@
                             begin
                               if !verbose then
                                 lprintf_nl ()
-                                  "   MASTER: RAISING %s (%Ld) instead of %s 
(%Ld)"
-                                  (Ip.to_string s.server_ip) s.server_nusers
-                                  (Ip.to_string ss.server_ip) ss.server_nusers;
+                                  "master servers: raising %s, disconnected %s"
+                                  (Ip.to_string s.server_ip) (Ip.to_string 
ss.server_ip);
                               ss.server_master <- false;
                               masters := tail;
                               make_master s
@@ -843,7 +857,7 @@
         )
     ) server_list;
   if !verbose then
-      lprintf_nl () "MASTER: clean %d connected %d masters"
+      lprintf_nl () "master servers: %d connected %d masters - re-computing 
completed"
         !nconnected_servers !nmasters
 
 
Index: mldonkey/src/networks/donkey/donkeyShare.ml
diff -u mldonkey/src/networks/donkey/donkeyShare.ml:1.32 
mldonkey/src/networks/donkey/donkeyShare.ml:1.33
--- mldonkey/src/networks/donkey/donkeyShare.ml:1.32    Sat Dec 17 20:10:13 2005
+++ mldonkey/src/networks/donkey/donkeyShare.ml Sun Dec 18 14:50:38 2005
@@ -144,7 +144,7 @@
 lprint_newline ());
   *)
     if !verbose_share then
-      lprintf_nl () "Sharing %s" sh.sh_name;
+      lprintf_nl () "new_file_to_share: Sharing %s" sh.sh_name;
   with e ->
       lprintf_nl () "Exception %s while sharing %s" (Printexc2.to_string e)
       sh.sh_name
@@ -166,6 +166,7 @@
    Should I only do it for master servers, no ?
 *)
 let send_new_shared () =
+  let tag = ref false in
   if !new_shared then
     begin
       new_shared := false;
@@ -174,14 +175,13 @@
           List.iter (fun s ->
             if s.server_master then
               begin
-                if !verbose_share then
+                if !verbose_share || !verbose then
                   lprintf_nl () "donkey send_new_shared: found master server";
+               tag := true;
                 do_if_connected s.server_sock (fun sock ->
                   server_send_share s.server_has_zlib sock !new_shared_files)
-              end
-                )
-          (connected_servers ());
-          if !verbose_share then
+              end) (connected_servers ());
+          if !tag && (!verbose_share || !verbose) then
               lprintf_nl () "donkey send_new_shared: Sent %d new shared files 
to servers"
                     (List.length !new_shared_files);
           new_shared_files := []
@@ -262,7 +262,7 @@
 let _ =
   network.op_network_share <- (fun fullname codedname size ->
       if !verbose_share then
-        lprintf_nl () "Sharing %s" fullname;
+        lprintf_nl () "op_network_share: Sharing %s" fullname;
       try
 (*
 lprintf "Searching %s" fullname; lprint_newline ();
@@ -333,8 +333,8 @@
           let disk_name = file_disk_name file in
           Unix32.mtime disk_name
         with _ ->
-            if !verbose_hidden_errors then
-              lprintf_nl () "Share: Trying mtime on new name %s, disk_name %s, 
too much files in shared_files_new.ini"
+            if !verbose then
+              lprintf_nl () "Share: Trying mtime on new name %s, disk_name %s, 
too many files in shared_files_new.ini"
                new_name (file_disk_name file);
             Unix32.mtime new_name
       in
Index: mldonkey/src/networks/donkey/donkeySupernode.ml
diff -u mldonkey/src/networks/donkey/donkeySupernode.ml:1.10 
mldonkey/src/networks/donkey/donkeySupernode.ml:1.11
--- mldonkey/src/networks/donkey/donkeySupernode.ml:1.10        Wed Dec 14 
21:17:46 2005
+++ mldonkey/src/networks/donkey/donkeySupernode.ml     Sun Dec 18 14:50:38 2005
@@ -122,7 +122,6 @@
       close sock Closed_by_user
 
   | M.ConnectReplyReq t ->
-      printf_string "******* [BROWSE CCONN OK] ********";
       node.node_md4 <- t.M.Connect.md4;
 
   | _ -> (* Don't care about other messages *)
@@ -138,7 +137,6 @@
           TcpBufferedSocket.set_write_controler sock upload_control;
           set_rtimeout sock !!client_timeout;
           set_handler sock (BASIC_EVENT RTIMEOUT) (fun s ->
-              printf_string "[BR?]";
               close s Closed_for_timeout
           );
           let emule_proto = emule_proto () in
Index: mldonkey/src/networks/donkey/donkeyThieves.ml
diff -u mldonkey/src/networks/donkey/donkeyThieves.ml:1.6 
mldonkey/src/networks/donkey/donkeyThieves.ml:1.7
--- mldonkey/src/networks/donkey/donkeyThieves.ml:1.6   Mon Aug  8 16:47:31 2005
+++ mldonkey/src/networks/donkey/donkeyThieves.ml       Sun Dec 18 14:50:38 2005
@@ -52,7 +52,6 @@
 
 let hashes_usage = Md4_hashtbl.create 1023
 
-(* *)
 ;;
 let register_client_hash ip hash =
   let find_by_ip ip =
@@ -102,7 +101,8 @@
            (* it switched to a hash that's used somewhere else,
               that's certainly a theft. *)
            if !verbose then
-             lprintf "That hash was already used somewhere else, that's 
certainly a theft!\n";
+             lprintf_nl () "client_md4 %s (ip:%s) was already used somewhere 
else, that's certainly a theft!"
+               (Md4.to_string hash) (Ip.to_string ip);
            false
 ;;
 let clean_thieves () =
Index: mldonkey/src/networks/fileTP/fileTPHTTP.ml
diff -u mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.18 
mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.19
--- mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.18     Wed Dec 14 21:17:47 2005
+++ mldonkey/src/networks/fileTP/fileTPHTTP.ml  Sun Dec 18 14:50:38 2005
@@ -244,7 +244,7 @@
                 (start_pos, end_pos)
           with _ ->
 (* A bit dangerous, no ??? *)
-              if !verbose_hidden_errors then
+              if !verbose_unknown_messages then
                 lprintf_nl () "ERROR: Could not find/parse range header 
(exception %s), disconnect\nHEADER: %s"
                     (Printexc2.to_string e)
                     (String.escaped header);
@@ -353,7 +353,7 @@
           end)
 
   with e ->
-      if !verbose_hidden_errors then
+      if !verbose_unknown_messages then
         begin
           lprintf_nl () "Exception %s in client_parse_header" 
(Printexc2.to_string e);
           AnyEndian.dump header
Index: mldonkey/src/networks/gnutella/gnutellaClients.ml
diff -u mldonkey/src/networks/gnutella/gnutellaClients.ml:1.34 
mldonkey/src/networks/gnutella/gnutellaClients.ml:1.35
--- mldonkey/src/networks/gnutella/gnutellaClients.ml:1.34      Wed Dec 14 
21:17:47 2005
+++ mldonkey/src/networks/gnutella/gnutellaClients.ml   Sun Dec 18 14:50:38 2005
@@ -381,7 +381,7 @@
                 (start_pos, end_pos)
           with _ ->  *)
 (* A bit dangerous, no ??? *)
-          if !verbose_hidden_errors then
+          if !verbose_unknown_messages then
             begin
               lprintf "[GDO] ERROR: Could not find/parse range header 
(exception %s), disconnect\n" 
                 (Printexc2.to_string e);
@@ -438,7 +438,7 @@
           end)
   
   with e ->
-      if !verbose_hidden_errors then
+      if !verbose_unknown_messages then
         begin
           lprintf "[GDO] Exception %s in client_parse_header\n" 
(Printexc2.to_string e);
           print_head first_line headers;
@@ -553,7 +553,7 @@
                 in
                 iter ()
               with Not_found -> 
-               if !verbose_hidden_errors then
+               if !verbose_unknown_messages then
                   lprintf_nl "Unable to get a block !!";
                   check_finished swarmer file;
                   raise Not_found
Index: mldonkey/src/networks/gnutella/gnutellaFunctions.ml
diff -u mldonkey/src/networks/gnutella/gnutellaFunctions.ml:1.3 
mldonkey/src/networks/gnutella/gnutellaFunctions.ml:1.4
--- mldonkey/src/networks/gnutella/gnutellaFunctions.ml:1.3     Mon Aug  1 
23:53:54 2005
+++ mldonkey/src/networks/gnutella/gnutellaFunctions.ml Sun Dec 18 14:50:38 2005
@@ -93,7 +93,7 @@
   match !default_handler_hook with
     None ->
       let b = buf sock in
-      if !verbose_hidden_errors then
+      if !verbose then
         lprintf "HttpReader: Handler not found for [%s]\n"
           (String.escaped (String.sub b.buf b.pos b.len));
       close sock (Closed_for_error "not recognized");
@@ -126,7 +126,7 @@
                       (try 
                           default gconn sock 
                         with e ->
-                            if !verbose_hidden_errors then
+                            if !verbose then
                               lprintf "HttpReader: default handler raised %s\n"
                                 (Printexc2.to_string e);
                             close sock (Closed_for_exception e));
@@ -158,7 +158,7 @@
                             (try
                                 h gconn sock (first_line, headers);
                               with e ->
-                                if !verbose_hidden_errors then
+                                if !verbose then
                                   lprintf "HttpReader: handler raised %s\n"
                                     (Printexc2.to_string e);
                                   close sock (Closed_for_exception e));
@@ -190,7 +190,7 @@
           (try
               h gconn sock;
             with e ->
-                if !verbose_hidden_errors then
+                if !verbose then
                   lprintf "Reader: handler raised %s\n"
                     (Printexc2.to_string e);
                 close sock (Closed_for_exception e));
Index: mldonkey/src/networks/gnutella/gnutellaProto.ml
diff -u mldonkey/src/networks/gnutella/gnutellaProto.ml:1.11 
mldonkey/src/networks/gnutella/gnutellaProto.ml:1.12
--- mldonkey/src/networks/gnutella/gnutellaProto.ml:1.11        Thu Dec 15 
19:41:46 2005
+++ mldonkey/src/networks/gnutella/gnutellaProto.ml     Sun Dec 18 14:50:38 2005
@@ -506,7 +506,7 @@
     | UNKNOWN i ->  { pkt with pkt_payload = UnknownReq 
             (UNKNOWN i,pkt.pkt_payload) }
   with e ->
-      if !verbose_hidden_errors then
+      if !verbose_unknown_messages then
         begin
           lprintf "Exception in parse: %s\n" (Printexc2.to_string e);
           dump pkt.pkt_payload;
Index: mldonkey/src/networks/gnutella2/g2Handler.ml
diff -u mldonkey/src/networks/gnutella2/g2Handler.ml:1.14 
mldonkey/src/networks/gnutella2/g2Handler.ml:1.15
--- mldonkey/src/networks/gnutella2/g2Handler.ml:1.14   Wed Dec 14 21:17:47 2005
+++ mldonkey/src/networks/gnutella2/g2Handler.ml        Sun Dec 18 14:50:38 2005
@@ -428,8 +428,8 @@
                   let xml = Xml.xml_of (Xml.parse_string xml) in
                   xml_info := Some xml
                 with e ->
-                    if !verbose_hidden_errors then
-                      lprintf "Exception %s while parsing: \n%s\n"
+                    if !verbose_unknown_messages then
+                      lprintf_nl "Exception %s while parsing: \n%s"
                         (Printexc2.to_string e) xml
               
               end
@@ -450,8 +450,8 @@
                       tags)
                 ) user_files files
               end else begin
-                if !verbose_hidden_errors then
-                  lprintf "ERROR: Not enough XML entries %d/%d\n"
+                if !verbose_unknown_messages then
+                  lprintf_nl "ERROR: Not enough XML entries %d/%d"
                     (List.length files) (List.length user_files);
                 user_files 
               end
Index: mldonkey/src/networks/gnutella2/g2Proto.ml
diff -u mldonkey/src/networks/gnutella2/g2Proto.ml:1.13 
mldonkey/src/networks/gnutella2/g2Proto.ml:1.14
--- mldonkey/src/networks/gnutella2/g2Proto.ml:1.13     Thu Dec 15 19:41:46 2005
+++ mldonkey/src/networks/gnutella2/g2Proto.ml  Sun Dec 18 14:50:38 2005
@@ -611,8 +611,8 @@
   try
     if be then 
       (
-       if !verbose_hidden_errors then
-         lprintf "Big Endian not supported yet\n";
+       if !verbose then
+         lprintf_nl "Big Endian not supported yet";
        raise Exit
       );
     let module M = G2_LittleEndian in
@@ -766,7 +766,7 @@
         UPROD_XML xml
     | _ -> raise Not_found
   with e ->
-      if !verbose_hidden_errors then
+      if !verbose_unknown_messages then
         begin
           lprintf "Cannot parse: %s\n   " (Printexc2.to_string e);
           List.iter (fun name -> lprintf "%s/" name) names;
@@ -1128,8 +1128,8 @@
         | 2, false -> LittleEndian.get_int16 buf (pos+1), 3 
         | 3, false -> LittleEndian.get_int24 buf (pos+1), 4
         | _ ->
-            if !verbose_hidden_errors then
-              lprintf "no correct pkt_len, pkt_pos\n";
+            if !verbose then
+              lprintf_nl "no correct pkt_len, pkt_pos";
             0, 1
       in
       let name_len = ((cb lsr 3) land 7) + 1 in
@@ -1512,8 +1512,8 @@
         | 2, false -> LittleEndian.get_int16 buf (pos+1), 3 
         | 3, false -> LittleEndian.get_int24 buf (pos+1), 4
         | _ ->
-            if !verbose_hidden_errors then
-              lprintf "no correct pkt_len, pkt_pos\n";
+            if !verbose then
+              lprintf_nl "no correct pkt_len, pkt_pos";
             0, 1
       in
       let name_len = ((cb lsr 3) land 7) + 1 in
Index: mldonkey/src/networks/opennap/opennapServers.ml
diff -u mldonkey/src/networks/opennap/opennapServers.ml:1.11 
mldonkey/src/networks/opennap/opennapServers.ml:1.12
--- mldonkey/src/networks/opennap/opennapServers.ml:1.11        Sat Nov  5 
16:23:41 2005
+++ mldonkey/src/networks/opennap/opennapServers.ml     Sun Dec 18 14:50:38 2005
@@ -430,7 +430,6 @@
 (*      lprintf "CONNECTING ONE SERVER\n"; *)
             DG.connection_try s.server_connection_control;
             incr nservers;
-            DG.printf_char 's'; 
             let sock = TcpBufferedSocket.connect token "opennap to server" 
                 (Ip.to_inet_addr s.server_ip) s.server_port 
                 (server_handler s) (* Mftp_comm.server_msg_to_string*)  in
Index: mldonkey/src/utils/net/basicSocket.ml
diff -u mldonkey/src/utils/net/basicSocket.ml:1.26 
mldonkey/src/utils/net/basicSocket.ml:1.27
--- mldonkey/src/utils/net/basicSocket.ml:1.26  Wed Dec 14 21:17:47 2005
+++ mldonkey/src/utils/net/basicSocket.ml       Sun Dec 18 14:50:38 2005
@@ -119,7 +119,8 @@
 let allow_read = ref true
 let allow_write = ref true
 
-let infinite_timeout = 3600. *. 24. *. 365. (* one year ! *)
+(*let infinite_timeout = 3600. *. 24. *. 365. (* one year ! *) *)
+let infinite_timeout = float_of_int Date.year_in_secs
 let current_time = ref (Unix.gettimeofday ())
 let last_time = ref (int_of_float (!current_time -. 1000000000.))
 
Index: mldonkey/src/utils/net/ip_set.ml
diff -u mldonkey/src/utils/net/ip_set.ml:1.21 
mldonkey/src/utils/net/ip_set.ml:1.22
--- mldonkey/src/utils/net/ip_set.ml:1.21       Wed Dec 14 21:17:47 2005
+++ mldonkey/src/utils/net/ip_set.ml    Sun Dec 18 14:50:39 2005
@@ -348,7 +348,10 @@
           nleft + 1 + nright in
 
   let _ = print_list_aux bl in
-  Printf.bprintf buf "%d ranges loaded - optimized to %d\n" !ranges_1 !ranges_2
+  if !ranges_1 = 0 then
+    Printf.bprintf buf "%d ranges loaded\n" !ranges_1
+  else
+    Printf.bprintf buf "%d ranges loaded - optimized to %d\n" !ranges_1 
!ranges_2
 
 let bl = ref BL_Empty
 




reply via email to

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