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, 24 Dec 2005 02:36:09 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    05/12/24 02:36:09

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonHasher.ml commonSwarming2.ml 
        src/daemon/driver: driverMain.ml 
        src/networks/donkey: donkeyClient.ml donkeyComplexOptions.ml 
                             donkeyNeighbours.ml donkeyShare.ml 
        src/utils/net  : basicSocket.ml 

Log message:
        patch #4732

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.633&tr2=1.634&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonHasher.ml.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonSwarming2.ml.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/driver/driverMain.ml.diff?tr1=1.84&tr2=1.85&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml.diff?tr1=1.74&tr2=1.75&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyComplexOptions.ml.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyNeighbours.ml.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyShare.ml.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/net/basicSocket.ml.diff?tr1=1.27&tr2=1.28&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.633 mldonkey/distrib/ChangeLog:1.634
--- mldonkey/distrib/ChangeLog:1.633    Wed Dec 21 20:43:02 2005
+++ mldonkey/distrib/ChangeLog  Sat Dec 24 02:36:09 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/24
+4732: Log: More infos for verbosity = " verb"
+
 2005/12/21
 4728: fix date format (zet)
 4730: BT: parse path.utf-8 (zet)
Index: mldonkey/src/daemon/common/commonHasher.ml
diff -u mldonkey/src/daemon/common/commonHasher.ml:1.6 
mldonkey/src/daemon/common/commonHasher.ml:1.7
--- mldonkey/src/daemon/common/commonHasher.ml:1.6      Fri Jul 22 14:32:12 2005
+++ mldonkey/src/daemon/common/commonHasher.ml  Sat Dec 24 02:36:09 2005
@@ -79,8 +79,6 @@
                   | MD4 -> "MD4");
               end;
             job_start job fd;
-            if !verbose_md4 then
-              lprintf_nl "[cHa] Job started"
           with e ->
               lprintf_nl "[cHa] Exception %s in starting job"
                 (Printexc2.to_string e);
Index: mldonkey/src/daemon/common/commonSwarming2.ml
diff -u mldonkey/src/daemon/common/commonSwarming2.ml:1.24 
mldonkey/src/daemon/common/commonSwarming2.ml:1.25
--- mldonkey/src/daemon/common/commonSwarming2.ml:1.24  Sun Dec 18 14:50:38 2005
+++ mldonkey/src/daemon/common/commonSwarming2.ml       Sat Dec 24 02:36:09 2005
@@ -1093,13 +1093,10 @@
                 t.t_verified t.t_nverified_blocks i;
                 if !verbose_swarming || !verbose then
                  lprintf_nl () "Completed block %d/%d of %s"
-                    i t.t_nchunks (file_best_name t.t_file)
+                    (i + 1) 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 ->
@@ -1109,7 +1106,7 @@
                  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);
+                            (i + 1) t.t_nchunks (file_best_name t.t_file);
 
                     t.t_converted_verified_bitmap.[i] <- '0';
 
Index: mldonkey/src/daemon/driver/driverMain.ml
diff -u mldonkey/src/daemon/driver/driverMain.ml:1.84 
mldonkey/src/daemon/driver/driverMain.ml:1.85
--- mldonkey/src/daemon/driver/driverMain.ml:1.84       Wed Dec 14 21:17:46 2005
+++ mldonkey/src/daemon/driver/driverMain.ml    Sat Dec 24 02:36:09 2005
@@ -347,7 +347,7 @@
       _s " : find another port when one is already used";
       "-pid", Arg.String (fun s -> pid := s;
       ),
-       _s ": directory for pid file (works only on non-Windows platforms)";
+       _s ": directory for pid file";
     ] @
       !more_args
       @
@@ -429,8 +429,8 @@
   lprintf (_b "%senabling networks: ") (log_time ());
   networks_iter (fun r ->
 (*      lprintf "(4) networks_iter enabling\n"; *)
-      network_enable r;
       lprintf (_b "%s ") r.network_name;
+      network_enable r;
 (* are there drawbacks to start recover_temp unconditionally here ? *)
       if !!recover_temp_on_startup then
         network_recover_temp r;
Index: mldonkey/src/networks/donkey/donkeyClient.ml
diff -u mldonkey/src/networks/donkey/donkeyClient.ml:1.74 
mldonkey/src/networks/donkey/donkeyClient.ml:1.75
--- mldonkey/src/networks/donkey/donkeyClient.ml:1.74   Sun Dec 18 14:50:38 2005
+++ mldonkey/src/networks/donkey/donkeyClient.ml        Sat Dec 24 02:36:09 2005
@@ -150,17 +150,18 @@
     try
       let record = Hashtbl.find old_requests (client_num c, file_num file) in
       if record.last_request + 540 > last_time () then begin
-          record.nwarnings <- record.nwarnings+ 1;
+          let old_time = last_time () - record.last_request in
+          record.nwarnings <- record.nwarnings + 1;
           record.last_request <- last_time ();
           if record.nwarnings > 3 then raise Exit;
           let module M = DonkeyProtoClient in
-          if record.nwarnings =3 then begin
+          if record.nwarnings = 3 then begin
               ban_client c sock "is connecting too fast";
               raise Exit;
             end;
           if !verbose then
-              lprintf_nl () "warned, connecting too fast: %s"
-                (full_client_identifier c);
+              lprintf_nl () "warning no. %d, connecting too fast (last connect 
%d sec. ago): %s"
+               record.nwarnings old_time (full_client_identifier c);
           if !!send_warning_messages then
             client_send c ( M.SayReq  (
                 "[AUTOMATED WARNING] Your client is connecting too fast, it 
will get banned"))
@@ -1453,10 +1454,13 @@
           try
             let file = find_file t.Q.md4 in
               received_client_bitmap c file t.Q.chunks
-          with e -> if !verbose then
-            lprintf_nl () "Exception %s in Query Chunks Reply file-md4: %s 
client was %s"
-                    (Printexc2.to_string e) (Md4.to_string t.Q.md4)
-                        (full_client_identifier c)
+          with e ->
+           client_send c (M.NoSuchFileReq t.Q.md4);
+           if !verbose then lprintf_nl ()
+             "QueryChunksReply: Client (%s) asked for file_md4 %s, Exception 
%s"
+             (full_client_identifier c)
+             (Md4.to_string t.Q.md4)
+             (Printexc2.to_string e)
       end
   
   | M.QueryChunkMd4ReplyReq t ->
@@ -1583,7 +1587,8 @@
         end else
       if comp.comp_len > comp.comp_total then begin
           if !verbose_unknown_messages then
-            lprintf_nl () "ERROR: more data than compressed!";
+            lprintf_nl () "eMule compressed data, ignoring, more data (%d) 
than compressed (%d) from %s for %s"
+             comp.comp_len comp.comp_total (full_client_identifier c) 
(Md4.to_string comp.comp_md4);
           c.client_comp <- None;
         end
   
@@ -1649,7 +1654,7 @@
                   (full_client_identifier c) (Md4.to_string md4);
           if Random.int 100 < 3 && !!send_warning_messages then
             client_send c (
-                M.SayReq "[AUTOMATED WARNING] Please, update your MLdonkey 
client to at least version 2.5-16v!");
+                M.SayReq "[AUTOMATED WARNING] Please, update your MLdonkey 
client to at least version 2.7.0!");
         end;
       
       begin try   
@@ -2571,7 +2576,7 @@
         (CommonClient.as_client c.client_client);
         
       with e -> 
-        if !verbose then begin
-          lprintf_nl () "remove_location: exception %s" (Printexc2.to_string 
e);
-        end
+        if !verbose then
+          lprintf_nl () "remove_location for file_md4 %s: exception %s"
+           file_uid (Printexc2.to_string e)
   )
Index: mldonkey/src/networks/donkey/donkeyComplexOptions.ml
diff -u mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.40 
mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.41
--- mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.40   Sun Dec 18 
14:50:38 2005
+++ mldonkey/src/networks/donkey/donkeyComplexOptions.ml        Sat Dec 24 
02:36:09 2005
@@ -682,15 +682,18 @@
 
 let guptime () = !!guptime - !diff_time
   
-let load_sources () = 
-  (try 
-(*      lprintf "load_sources: loading sources\n"; *)
+let load_sources () =
+  (lprintf "(loading sources ";
+   try 
       let cleaner = DonkeySources.attach_sources_to_file file_sources_section 
in
       cleaner ();
+      lprintf ".";
       Options.load file_sources_ini;
+      lprintf ".";
       cleaner ();
+      lprintf ".";
       sources_loaded := true;
-(*      lprintf "load_sources: sources loaded\n"; *)
+      lprintf " completed) ";
       List.iter (fun list ->
           let files = ref [] in
           List.iter (fun m ->
Index: mldonkey/src/networks/donkey/donkeyNeighbours.ml
diff -u mldonkey/src/networks/donkey/donkeyNeighbours.ml:1.10 
mldonkey/src/networks/donkey/donkeyNeighbours.ml:1.11
--- mldonkey/src/networks/donkey/donkeyNeighbours.ml:1.10       Tue Dec  6 
20:26:40 2005
+++ mldonkey/src/networks/donkey/donkeyNeighbours.ml    Sat Dec 24 02:36:09 2005
@@ -165,7 +165,8 @@
         Fifo.put propositions (s, file, kind, last_time ())
     | _ ->
         if !verbose then
-          lprintf_nl () "ERROR, proposed client is indirect";
+          lprintf_nl () "Neighbours: error: proposed client (%s) is indirect 
for file %s"
+           (full_client_identifier c) (file_best_name file);
         raise Exit
 
   with Exit ->
Index: mldonkey/src/networks/donkey/donkeyShare.ml
diff -u mldonkey/src/networks/donkey/donkeyShare.ml:1.33 
mldonkey/src/networks/donkey/donkeyShare.ml:1.34
--- mldonkey/src/networks/donkey/donkeyShare.ml:1.33    Sun Dec 18 14:50:38 2005
+++ mldonkey/src/networks/donkey/donkeyShare.ml Sat Dec 24 02:36:09 2005
@@ -334,7 +334,7 @@
           Unix32.mtime disk_name
         with _ ->
             if !verbose then
-              lprintf_nl () "Share: Trying mtime on new name %s, disk_name %s, 
too many files in shared_files_new.ini"
+              lprintf_nl () "Share: Trying mtime on new name %s, disk_name %s, 
TODO: too many files in shared_files_new.ini?"
                new_name (file_disk_name file);
             Unix32.mtime new_name
       in
Index: mldonkey/src/utils/net/basicSocket.ml
diff -u mldonkey/src/utils/net/basicSocket.ml:1.27 
mldonkey/src/utils/net/basicSocket.ml:1.28
--- mldonkey/src/utils/net/basicSocket.ml:1.27  Sun Dec 18 14:50:38 2005
+++ mldonkey/src/utils/net/basicSocket.ml       Sat Dec 24 02:36:09 2005
@@ -549,7 +549,7 @@
 *)
       exec_hooks !before_select_hooks;
 (*      lprintf "Tasks %d\n" (List.length !fd_tasks); *)
-      select !fd_tasks !timeout;
+      try select !fd_tasks !timeout with _ -> ();
     with
     | e ->
         lprintf_nl "Exception %s in Select.loop" (Printexc2.to_string e);




reply via email to

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