[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: |
Wed, 02 Jan 2008 16:14:53 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 08/01/02 16:14:53
Modified files:
distrib : ChangeLog
src/daemon/common: commonShared.ml commonShared.mli
src/networks/bittorrent: bTInteractive.ml
src/networks/donkey: donkeyInteractive.ml
Log message:
patch #6360
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1338&r2=1.1339
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonShared.ml?cvsroot=mldonkey&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonShared.mli?cvsroot=mldonkey&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTInteractive.ml?cvsroot=mldonkey&r1=1.144&r2=1.145
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyInteractive.ml?cvsroot=mldonkey&r1=1.164&r2=1.165
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1338
retrieving revision 1.1339
diff -u -b -r1.1338 -r1.1339
--- distrib/ChangeLog 19 Dec 2007 19:58:16 -0000 1.1338
+++ distrib/ChangeLog 2 Jan 2008 16:14:52 -0000 1.1339
@@ -14,6 +14,10 @@
ChangeLog
=========
+2008/01/02
+6360: BT: New command print_torrent <file_num>,
+ new link in HTML, upstats to display .torrent details
+
2007/12/19
6351: Allow compilation with upcoming Ocaml 3.10.1
Index: src/daemon/common/commonShared.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonShared.ml,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- src/daemon/common/commonShared.ml 17 Jun 2007 01:21:45 -0000 1.40
+++ src/daemon/common/commonShared.ml 2 Jan 2008 16:14:52 -0000 1.41
@@ -50,7 +50,7 @@
and 'a shared_ops = {
mutable op_shared_info : ('a -> GuiTypes.shared_info);
mutable op_shared_unshare : ('a -> unit);
- mutable op_shared_state : (CommonTypes.file -> CommonTypes.ui_conn ->
string);
+ mutable op_shared_state : ('a -> CommonTypes.ui_conn -> string);
}
let as_shared (shared : 'a shared_impl) =
@@ -186,7 +186,7 @@
try
match impl.impl_shared_file with
| None -> ""
- | Some f -> impl.impl_shared_ops.op_shared_state f o
+ | Some f -> impl.impl_shared_ops.op_shared_state impl.impl_shared_val o
with _ -> ""
let shared_dir = function
Index: src/daemon/common/commonShared.mli
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonShared.mli,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/daemon/common/commonShared.mli 3 Dec 2006 20:57:56 -0000 1.9
+++ src/daemon/common/commonShared.mli 2 Jan 2008 16:14:52 -0000 1.10
@@ -15,7 +15,7 @@
and 'a shared_ops = {
mutable op_shared_info : 'a -> GuiTypes.shared_info;
mutable op_shared_unshare : 'a -> unit;
- mutable op_shared_state : CommonTypes.file -> CommonTypes.ui_conn -> string;
+ mutable op_shared_state : 'a -> CommonTypes.ui_conn -> string;
}
val dirnames_prio : (string * int) list ref
Index: src/networks/bittorrent/bTInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- src/networks/bittorrent/bTInteractive.ml 3 Aug 2007 22:12:58 -0000
1.144
+++ src/networks/bittorrent/bTInteractive.ml 2 Jan 2008 16:14:52 -0000
1.145
@@ -1091,6 +1091,35 @@
_s ""
), _s ":\t\t\t\tprint all .torrent files on this server";
+ "print_torrent", "Network/Bittorrent", Arg_one (fun arg o ->
+ if CommonUserDb.user2_is_admin o.conn_user.ui_user then begin
+ let file =
+ try
+ Some (as_file_impl (file_find (int_of_string arg)))
+ with _ -> None
+ in
+ match file with
+ | None -> Printf.sprintf "file %s not found" arg
+ | Some file ->
+ (
+ if use_html_mods o then begin
+ html_mods_cntr_init ();
+ html_mods_table_header o.conn_buf "sourcesInfo" "sourcesInfo" [
+ ( "0", "srh br", "File Info", "Info" ) ;
+ ( "0", "srh", "Value", "Value" ) ]
+ end;
+ op_file_print file.impl_file_val o;
+ if use_html_mods o then begin
+ Printf.bprintf o.conn_buf "\\</tr\\>\\</table\\>\\</div\\>";
+ Printf.bprintf o.conn_buf
"\\</td\\>\\</tr\\>\\</table\\>\\</div\\>\\<br\\>"
+ end
+ );
+ ""
+ end else
+ begin print_command_result o "You are not allowed to use print_torrent";
+ "" end
+ ), _s "<num> :\t\t\tshow internal data of .torrent file";
+
"seeded_torrents", "Network/Bittorrent", Arg_none (fun o ->
if CommonUserDb.user2_is_admin o.conn_user.ui_user then begin
List.iter (fun file ->
@@ -1330,7 +1359,10 @@
CommonNetwork.register_commands commands;
shared_ops.op_shared_state <- (fun file o ->
- "no BT data"
+ if o.conn_output = HTML then
+ Printf.sprintf "\\<a
href=\\\"submit?q=print_torrent+%d\\\"\\>Details\\</a\\>"
+ (file_num file)
+ else Printf.sprintf "Shared using %s" file.file_torrent_diskname
);
shared_ops.op_shared_unshare <- (fun file ->
(if !verbose_share then lprintf_file_nl (as_file file) "unshare file");
Index: src/networks/donkey/donkeyInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -b -r1.164 -r1.165
--- src/networks/donkey/donkeyInteractive.ml 17 Oct 2007 18:25:02 -0000
1.164
+++ src/networks/donkey/donkeyInteractive.ml 2 Jan 2008 16:14:53 -0000
1.165
@@ -1888,9 +1888,9 @@
let _ =
shared_ops.op_shared_state <- (fun f o ->
- match CommonFile.file_state f with
+ match file_state f with
| FileShared ->
- (match file_shared f with
+ (match file_shared (as_file f) with
| None -> "no file_shared info"
| Some f ->
let pre_share1_dir =
- [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...,
mldonkey-commits <=