[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/bittorr...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/bittorr... |
Date: |
Thu, 23 Feb 2006 10:49:24 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Branch:
Changes by: spiralvoice <address@hidden> 06/02/23 10:49:24
Modified files:
distrib : ChangeLog
src/networks/bittorrent: bTInteractive.ml
Log message:
patch #4933
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.746&tr2=1.747&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml.diff?tr1=1.81&tr2=1.82&r1=text&r2=text
Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.746 mldonkey/distrib/ChangeLog:1.747
--- mldonkey/distrib/ChangeLog:1.746 Tue Feb 21 08:33:29 2006
+++ mldonkey/distrib/ChangeLog Thu Feb 23 10:49:24 2006
@@ -14,6 +14,9 @@
ChangeLog
=========
+2006/02/23
+4933: BT: Display number of sources in GUI
+
2006/02/21
4928: BT: Fix invalid encoding in announce URL (darkfader)
4929: Do not print password_empty warning if enable_user_config true
Index: mldonkey/src/networks/bittorrent/bTInteractive.ml
diff -u mldonkey/src/networks/bittorrent/bTInteractive.ml:1.81
mldonkey/src/networks/bittorrent/bTInteractive.ml:1.82
--- mldonkey/src/networks/bittorrent/bTInteractive.ml:1.81 Sun Feb 5
13:19:14 2006
+++ mldonkey/src/networks/bittorrent/bTInteractive.ml Thu Feb 23 10:49:24 2006
@@ -61,13 +61,22 @@
(log_time ()); lprintf
let op_file_all_sources file =
-(* lprintf "file_sources\n"; *)
let list = ref [] in
Hashtbl.iter (fun _ c ->
list := (as_client c) :: !list
) file.file_clients;
!list
+let op_file_active_sources file =
+ let list = ref [] in
+ Hashtbl.iter (fun _ c ->
+ let as_c = as_client c in
+ match client_state as_c with
+ Connected_downloading _ -> list := as_c :: !list
+ | _ -> ()
+ ) file.file_clients;
+ !list
+
let op_file_files file impl =
match file.file_swarmer with
None -> [CommonFile.as_file impl]
@@ -408,6 +417,8 @@
P.file_chunks_age = last_seen;
P.file_uids = [Uid.create (BTUrl file.file_id)];
P.file_sub_files = file.file_files;
+ P.file_active_sources = List.length (op_file_active_sources file);
+ P.file_all_sources = (Hashtbl.length file.file_clients);
}
let op_ft_info ft =
@@ -992,7 +1003,7 @@
file_ops.op_file_all_sources <- op_file_all_sources;
file_ops.op_file_files <- op_file_files;
- file_ops.op_file_active_sources <- op_file_all_sources;
+ file_ops.op_file_active_sources <- op_file_active_sources;
file_ops.op_file_debug <- op_file_debug;
file_ops.op_file_commit <- op_file_commit;
file_ops.op_file_print_html <- op_file_print_html;