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: Fri, 17 Feb 2006 22:24:41 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    06/02/17 22:24:41

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonInteractive.ml commonRoom.ml 
        src/networks/donkey: donkeyClient.ml donkeyComplexOptions.ml 
                             donkeyOneFile.ml donkeyShare.ml 
        src/utils/net  : http_server.ml http_server.mli 
                         tcpBufferedSocket.ml 

Log message:
        patch #4915

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.736&tr2=1.737&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonInteractive.ml.diff?tr1=1.63&tr2=1.64&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonRoom.ml.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml.diff?tr1=1.85&tr2=1.86&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyComplexOptions.ml.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyOneFile.ml.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyShare.ml.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/net/http_server.ml.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/net/http_server.mli.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/net/tcpBufferedSocket.ml.diff?tr1=1.41&tr2=1.42&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.736 mldonkey/distrib/ChangeLog:1.737
--- mldonkey/distrib/ChangeLog:1.736    Fri Feb 17 22:23:33 2006
+++ mldonkey/distrib/ChangeLog  Fri Feb 17 22:24:41 2006
@@ -15,6 +15,7 @@
 =========
 
 2006/02/17
+4915: Log: Small cleanups
 4918: some syntax and comment cleanups in stubs_c.c (Schlumpf)
 
 2006/02/13
Index: mldonkey/src/daemon/common/commonInteractive.ml
diff -u mldonkey/src/daemon/common/commonInteractive.ml:1.63 
mldonkey/src/daemon/common/commonInteractive.ml:1.64
--- mldonkey/src/daemon/common/commonInteractive.ml:1.63        Wed Jan 11 
19:12:34 2006
+++ mldonkey/src/daemon/common/commonInteractive.ml     Fri Feb 17 22:24:41 2006
@@ -185,7 +185,6 @@
               Unix2.chmod new_name (Misc.int_of_octal_string 
!!create_dir_mask);
             let best_name = file_best_name file in
             Unix32.destroy (file_fd file);
-            if !verbose then lprintf_nl () " file_commit: destroyed";
             if Unix2.is_directory file_name then Unix2.remove_all_directory 
file_name;
             let impl = as_file_impl file in
 
@@ -208,7 +207,6 @@
             done_files =:= List2.removeq file !!done_files;
             files =:= List2.removeq file !!files;
 
-            if !verbose then lprintf_nl () "file_commit: going to 
secondaries...";
             List.iter (fun file ->
 (* Commit the file first, and share it after... *)
                 try
Index: mldonkey/src/daemon/common/commonRoom.ml
diff -u mldonkey/src/daemon/common/commonRoom.ml:1.4 
mldonkey/src/daemon/common/commonRoom.ml:1.5
--- mldonkey/src/daemon/common/commonRoom.ml:1.4        Mon Oct 10 16:22:24 2005
+++ mldonkey/src/daemon/common/commonRoom.ml    Fri Feb 17 22:24:41 2006
@@ -236,7 +236,7 @@
         op_room_close = (fun room -> 
             set_room_state (as_room room.room_impl) RoomOpened);  
         op_room_messages = (fun _ -> fni network "room_messages");
-        op_room_users = (fun _ -> fni network "room_users");
+        op_room_users = (fun _ -> failwith "not implemented");
         op_room_name = (fun _ -> fni network "room_name");
         op_room_info = (let module P = GuiTypes in
           fun r -> 
Index: mldonkey/src/networks/donkey/donkeyClient.ml
diff -u mldonkey/src/networks/donkey/donkeyClient.ml:1.85 
mldonkey/src/networks/donkey/donkeyClient.ml:1.86
--- mldonkey/src/networks/donkey/donkeyClient.ml:1.85   Sat Feb 11 14:52:45 2006
+++ mldonkey/src/networks/donkey/donkeyClient.ml        Fri Feb 17 22:24:41 2006
@@ -647,7 +647,7 @@
     | 6 -> Brand_hydranode
     | 10 -> Brand_mldonkey3
     | 20 -> Brand_lphant
-    | _ -> lprintf_nl () "unknown compatibleclient %d (please report to dev 
team)" num; Brand_unknown
+    | _ -> Brand_unknown
 
 let parse_mod_version s c =
   let rec iter i len =
@@ -700,7 +700,7 @@
           for_int_tag tag (fun i ->
             c.client_brand <- parse_compatible_client i c.client_brand;
             if c.client_brand = Brand_unknown then
-              lprintf_nl () "[compatibleclient] Brand_unknown %s" 
(full_client_identifier c);
+              lprintf_nl () "unknown compatibleclient %d (%s) (please report 
to dev team)" i (full_client_identifier c)
           )
       | Field_UNKNOWN "compression" ->
           for_int_tag tag (fun i ->
@@ -2609,27 +2609,30 @@
   DonkeySources.functions.DonkeySources.function_add_location <- (fun
       s_uid file_uid ->
       try
-        let c = new_client s_uid in
         let file = find_file (Md4.of_string file_uid) in
+        let c = new_client s_uid in
         
         CommonFile.file_add_source (CommonFile.as_file file.file_file) 
         (CommonClient.as_client c.client_client);
       
-      with e -> 
-        if !verbose then begin
-          lprintf_nl () "add_location: exception %s" (Printexc2.to_string e);
-        end
+      with
+       Not_found -> ()
+      | e -> 
+        if !verbose then
+          lprintf_nl () "add_location: exception %s" (Printexc2.to_string e)
   );
   
   DonkeySources.functions.DonkeySources.function_remove_location <- (fun
       s_uid file_uid ->
       try
-        let c = new_client s_uid in
         let file = find_file (Md4.of_string file_uid) in
+        let c = new_client s_uid in
         CommonFile.file_remove_source (CommonFile.as_file file.file_file)
         (CommonClient.as_client c.client_client);
         
-      with e -> 
+      with
+       Not_found -> ()
+      | e -> 
         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.42 
mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.43
--- mldonkey/src/networks/donkey/donkeyComplexOptions.ml:1.42   Wed Jan 11 
18:53:30 2006
+++ mldonkey/src/networks/donkey/donkeyComplexOptions.ml        Fri Feb 17 
22:24:41 2006
@@ -706,12 +706,12 @@
 let check_result r tags =
   if r.result_names = [] || r.result_size = Int64.zero then begin
       if !verbose then begin
-          lprintf_n () "BAD RESULT:";
+          lprintf_n () "Bad search result: ";
           List.iter (fun tag ->
-              lprintf "[%s] = [%s]" (string_of_field tag.tag_name)
-                (string_of_tag_value tag.tag_value);
-              lprint_newline ();
+              lprintf "[%s] = [%s] " (string_of_field tag.tag_name)
+                (string_of_tag_value tag.tag_value)
           ) tags;
+         lprint_newline ();
         end;
       false
     end
Index: mldonkey/src/networks/donkey/donkeyOneFile.ml
diff -u mldonkey/src/networks/donkey/donkeyOneFile.ml:1.34 
mldonkey/src/networks/donkey/donkeyOneFile.ml:1.35
--- mldonkey/src/networks/donkey/donkeyOneFile.ml:1.34  Sun Dec 18 14:50:38 2005
+++ mldonkey/src/networks/donkey/donkeyOneFile.ml       Fri Feb 17 22:24:41 2006
@@ -136,8 +136,6 @@
   file_completed (as_file file);
   Int64Swarmer.remove_swarmer file.file_swarmer;
   file.file_swarmer <- None;
-  
-  
   unshare_file file;
   ignore (CommonShared.new_shared "completed" 0 (
       file_best_name file )
Index: mldonkey/src/networks/donkey/donkeyShare.ml
diff -u mldonkey/src/networks/donkey/donkeyShare.ml:1.38 
mldonkey/src/networks/donkey/donkeyShare.ml:1.39
--- mldonkey/src/networks/donkey/donkeyShare.ml:1.38    Mon Feb  6 21:45:04 2006
+++ mldonkey/src/networks/donkey/donkeyShare.ml Fri Feb 17 22:24:41 2006
@@ -197,6 +197,8 @@
 files being shared !
 *)
 
+exception Wrong_file_size
+
 let computation = ref false
 
 (*   Compute (at most) one MD4 chunk if needed. *)
@@ -208,14 +210,10 @@
     | sh :: files ->
         let rec job_creater _ =
           try
-            if not (Sys.file_exists sh.shared_name) then begin
-                lprintf_nl () "Shared file doesn't exist";
-                raise Not_found;
-              end;
-            if Unix32.getsize sh.shared_name <> sh.shared_size then begin
-                lprintf_nl () "Bad shared file size";
+            if not (Sys.file_exists sh.shared_name) then
                 raise Not_found;
-              end;
+            if Unix32.getsize sh.shared_name <> sh.shared_size then
+                raise Wrong_file_size;
             computation := true;
             let end_pos = sh.shared_pos ++ block_size in
             let end_pos = if end_pos > sh.shared_size then sh.shared_size
@@ -252,8 +250,9 @@
                 else
                   job_creater ())
           with e ->
-              lprintf_nl () "Exception %s prevents sharing"
-                (Printexc2.to_string e);
+             shared_files := files;
+              lprintf_nl () "Exception %s prevents sharing of %s"
+                (Printexc2.to_string e) sh.shared_name
         in
         job_creater ()
 
@@ -286,9 +285,7 @@
 
          let found = ref false in
          List.iter (fun sh -> if sh.shared_name = fullname then found := true) 
!shared_files;
-         if !found then
-           lprintf_nl () "avoid sharing %s" fullname
-         else begin
+         if not !found then begin
           let rec impl = {
               impl_shared_update = 1;
               impl_shared_fullname = fullname;
Index: mldonkey/src/utils/net/http_server.ml
diff -u mldonkey/src/utils/net/http_server.ml:1.26 
mldonkey/src/utils/net/http_server.ml:1.27
--- mldonkey/src/utils/net/http_server.ml:1.26  Mon Dec  5 18:37:34 2005
+++ mldonkey/src/utils/net/http_server.ml       Fri Feb 17 22:24:41 2006
@@ -97,9 +97,6 @@
 | Authorization of auth
 
 
-exception ProcessForked
-exception ThreadForked
-
 type options = {
     referer : Url.url option;
     content_length : int;
Index: mldonkey/src/utils/net/http_server.mli
diff -u mldonkey/src/utils/net/http_server.mli:1.5 
mldonkey/src/utils/net/http_server.mli:1.6
--- mldonkey/src/utils/net/http_server.mli:1.5  Sun Jul 17 23:15:04 2005
+++ mldonkey/src/utils/net/http_server.mli      Fri Feb 17 22:24:41 2006
@@ -21,8 +21,6 @@
     Unknown of string * string
   | Referer of Url.url
   | Authorization of auth
-exception ProcessForked
-exception ThreadForked
 type options = {
     referer : Url.url option;
     content_length : int;
Index: mldonkey/src/utils/net/tcpBufferedSocket.ml
diff -u mldonkey/src/utils/net/tcpBufferedSocket.ml:1.41 
mldonkey/src/utils/net/tcpBufferedSocket.ml:1.42
--- mldonkey/src/utils/net/tcpBufferedSocket.ml:1.41    Sat Jan 14 22:16:45 2006
+++ mldonkey/src/utils/net/tcpBufferedSocket.ml Fri Feb 17 22:24:41 2006
@@ -1021,7 +1021,6 @@
 (*      lprintf "close_after_write: CLOSE\n";  - log output removed  *)
         shutdown t Closed_by_user)
 
-exception Http_proxy_error of string
 let http_proxy = ref None
 
 let set_reader t f =




reply via email to

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