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/driver/dr...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr...
Date: Sun, 23 Feb 2014 18:17:59 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       14/02/23 18:17:59

Modified files:
        distrib        : ChangeLog 
        src/daemon/driver: driverCommands.ml 

Log message:
        patch #8332

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1591&r2=1.1592
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.269&r2=1.270

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1591
retrieving revision 1.1592
diff -u -b -r1.1591 -r1.1592
--- distrib/ChangeLog   23 Feb 2014 18:17:23 -0000      1.1591
+++ distrib/ChangeLog   23 Feb 2014 18:17:58 -0000      1.1592
@@ -15,6 +15,7 @@
 =========
 
 2014/02/23:
+8332: New option "all" for command verify_chunks (ygrek)
 8331: printf2: add ?exn parameter for easy exception printing (ygrek)
 8330: printexc2: reduce complexity, drop unused code (ygrek)
 8329: printf2: reduce complexity, use Printf.ksprintf (ygrek)

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -b -r1.269 -r1.270
--- src/daemon/driver/driverCommands.ml 23 Feb 2014 18:14:52 -0000      1.269
+++ src/daemon/driver/driverCommands.ml 23 Feb 2014 18:17:59 -0000      1.270
@@ -3122,20 +3122,23 @@
     "verify_chunks", Arg_multiple (fun args o ->
         let buf = o.conn_buf in
         match args with
-          [arg] ->
-            let num = int_of_string arg in
+        | [] -> ""
+        | "all"::[] ->
+            Printf.bprintf buf "Verifying chunks of all files";
+            List.iter file_check !!files;
+            _s "done"
+        | l ->
+            let l = List.map int_of_string l in
               List.iter
-                (fun file -> if (as_file_impl file).impl_file_num = num then
+              (fun file ->
+                if List.mem (file_num file) l then
                     begin
-                      Printf.bprintf  buf "Verifying Chunks of file %d" num;
+                  Printf.bprintf  buf "Verifying chunks of file %d : %s" 
(file_num file) (file_best_name file);
                       file_check file;
-                    end
-              )
+                end)
               !!files;
             ""
-        | _ -> ();
-            _s "done"
-    ), "<num> :\t\t\tverify chunks of file <num>";
+    ), "<num|all> :\t\t\tverify chunks of file <num> (use 'all' for all 
files)";
 
     "pause", Arg_multiple (fun args o ->
       let filter = 



reply via email to

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