[Top][All Lists]
[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: |
Mon, 15 Jan 2007 18:28:03 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 07/01/15 18:28:03
Modified files:
distrib : ChangeLog
src/daemon/common: commonHasher.ml
src/networks/donkey: donkeyClient.ml donkeyFiles.ml
donkeyOneFile.ml donkeyOneFile.mli
Log message:
patch #5689
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1150&r2=1.1151
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonHasher.ml?cvsroot=mldonkey&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyClient.ml?cvsroot=mldonkey&r1=1.119&r2=1.120
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyFiles.ml?cvsroot=mldonkey&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyOneFile.ml?cvsroot=mldonkey&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyOneFile.mli?cvsroot=mldonkey&r1=1.7&r2=1.8
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1150
retrieving revision 1.1151
diff -u -b -r1.1150 -r1.1151
--- distrib/ChangeLog 15 Jan 2007 18:27:21 -0000 1.1150
+++ distrib/ChangeLog 15 Jan 2007 18:28:03 -0000 1.1151
@@ -15,6 +15,7 @@
=========
2007/01/15
+5689: EDK: Log downloading file name when client disconnects
5684: GUI: Fix build of mlprogress (Alt linux)
5677: Options: New concept of option types, fix non-admin Sancho http preview
Index: src/daemon/common/commonHasher.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonHasher.ml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/daemon/common/commonHasher.ml 18 Mar 2006 18:35:54 -0000 1.9
+++ src/daemon/common/commonHasher.ml 15 Jan 2007 18:28:03 -0000 1.10
@@ -20,6 +20,14 @@
open Printf2
open CommonOptions
+let log_prefix = "[cHa]"
+
+let lprintf_nl fmt =
+ lprintf_nl2 log_prefix fmt
+
+let lprintf_n fmt =
+ lprintf2 log_prefix fmt
+
type hash_method = MD4 | MD5 | SHA1 | TIGER
type 'a job = {
@@ -46,14 +54,14 @@
| None -> raise Not_found
| Some (job, fd) ->
if job_done job then begin
- if !verbose_md4 then lprintf_nl "[cHa] Finished %s job %s %Ld
%Ld"
+ if !verbose_md4 then lprintf_nl "Finished %s job %s %Ld %Ld"
(match job.job_method with
MD5 -> "MD5" | TIGER -> "TIGER" | SHA1 -> "SHA1" | MD4 ->
"MD4")
job.job_name job.job_begin job.job_len;
current_job := None;
Unix.close fd;
(try job.job_handler job with e ->
- lprintf_nl "[cHa] exception %s in job_handler"
+ lprintf_nl "exception %s in job_handler"
(Printexc2.to_string e);
);
raise Not_found
@@ -72,7 +80,7 @@
current_job := Some (job, fd);
job_start job fd;
with e ->
- lprintf_nl "[cHa] Exception %s in starting job"
+ lprintf_nl "Exception %s in starting job"
(Printexc2.to_string e);
)
Index: src/networks/donkey/donkeyClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- src/networks/donkey/donkeyClient.ml 8 Jan 2007 15:12:10 -0000 1.119
+++ src/networks/donkey/donkeyClient.ml 15 Jan 2007 18:28:03 -0000 1.120
@@ -264,14 +264,21 @@
c.client_source.DonkeySources.source_sock <- NoConnection;
save_join_queue c;
c.client_slot <- SlotNotAsked;
- let files = c.client_file_queue in
- (try DonkeyOneFile.clean_current_download c with _ -> ());
+(* clean_client_zones: clean all structures related to downloads when
+ a client disconnects *)
+ (try
+ match c.client_download with
+ | None -> ()
+ | Some (file, up) ->
+ CommonSwarming.unregister_uploader up;
+ c.client_download <- None
+ with _ -> ());
List.iter (fun (file, chunks, up) ->
try CommonSwarming.unregister_uploader up with _ -> ()
- )
- files;
+ ) c.client_file_queue;
+
c.client_file_queue <- [];
c.client_session_downloaded <- 0L;
@@ -1404,7 +1411,6 @@
lprintf_nl "Slot closed during download";
CommonSwarming.clear_uploader_ranges up
end;
-(* DonkeyOneFile.clean_current_download c; *)
c.client_session_downloaded <- 0L;
c.client_slot <- SlotNotAsked;
(* OK, the slot is closed, but what should we do now ????? *)
Index: src/networks/donkey/donkeyFiles.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyFiles.ml,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- src/networks/donkey/donkeyFiles.ml 11 Jan 2007 12:24:18 -0000 1.26
+++ src/networks/donkey/donkeyFiles.ml 15 Jan 2007 18:28:03 -0000 1.27
@@ -203,10 +203,10 @@
DonkeyOneFile.remove_client_slot c;
lprintf_nl "File %s is too large for %s." (file_best_name
up.up_file) (full_client_identifier c);
end else
- if up.up_file.file_shared = None then begin
+ if up.up_file.file_shared = None then
(* Is there a message to warn that a file is not shared anymore ? *)
- DonkeyOneFile.remove_client_slot c;
- end else
+ DonkeyOneFile.remove_client_slot c
+ else
let compress = !!upload_compression &&
(c.client_emule_proto.emule_compression <> 0) in
let cfile,ccomp = match cached_load up.up_file begin_offset
end_offset compress with
Some (cached_file,cached_comp) -> cached_file,cached_comp
Index: src/networks/donkey/donkeyOneFile.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyOneFile.ml,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- src/networks/donkey/donkeyOneFile.ml 8 Jan 2007 12:20:40 -0000
1.48
+++ src/networks/donkey/donkeyOneFile.ml 15 Jan 2007 18:28:03 -0000
1.49
@@ -113,9 +113,11 @@
(match client_upload (as_client c) with | None -> ""
| Some f -> " of " ^ (CommonFile.file_best_name f)) else "")
(if c.client_total_downloaded > 0L then
- Printf.sprintf ", rec %s (%s)"
+ Printf.sprintf ", rec %s (%s)%s"
(size_of_int64 c.client_session_downloaded)
- (size_of_int64 c.client_total_downloaded) else "");
+ (size_of_int64 c.client_total_downloaded)
+ (match c.client_download with | None -> ""
+ | Some (f,_) -> " of " ^ (file_best_name f)) else "");
set_client_has_a_slot (as_client c) NoSlot;
client_send c (
let module M = DonkeyProtoClient in
@@ -235,15 +237,6 @@
(* let next_file _ = failwith "next_file not implemented" *)
-(* clean_client_zones: clean all structures related to downloads when
- a client disconnects *)
-let clean_current_download c =
- match c.client_download with
- None -> ()
- | Some (file, up) ->
- CommonSwarming.unregister_uploader up;
- c.client_download <- None
-
let send_get_range_request c file ranges =
let rec check_large (rangelist : (int64 * int64 * range) list) =
match rangelist with
@@ -407,9 +400,7 @@
or start querying blocks if already in the queue *)
let request_slot c =
if c.client_slot = SlotNotAsked then begin
- if !verbose_download then begin
- lprintf_nl "start_download";
- end;
+ if !verbose_download then lprintf_nl "start_download";
do_if_connected c.client_source.DonkeySources.source_sock (fun sock ->
sort_file_queue c;
match c.client_file_queue with
Index: src/networks/donkey/donkeyOneFile.mli
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyOneFile.mli,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/networks/donkey/donkeyOneFile.mli 12 Nov 2005 11:20:21 -0000
1.7
+++ src/networks/donkey/donkeyOneFile.mli 15 Jan 2007 18:28:03 -0000
1.8
@@ -20,7 +20,6 @@
open CommonSwarming
open Md4
-val clean_current_download : DonkeyTypes.client -> unit
val get_from_client : DonkeyTypes.client -> unit
val request_slot : DonkeyTypes.client -> unit
val check_files_downloaded : unit -> unit
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/06
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/06
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/08
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/08
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/11
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/15
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...,
mldonkey-commits <=
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/17
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/21
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/25
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/25
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/25
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/28
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co..., mldonkey-commits, 2007/01/30