[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: |
Fri, 02 Apr 2010 09:46:06 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 10/04/02 09:46:06
Modified files:
distrib : ChangeLog
src/networks/bittorrent: bTClients.ml bTInteractive.ml
Log message:
patch #7151
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1417&r2=1.1418
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTClients.ml?cvsroot=mldonkey&r1=1.101&r2=1.102
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTInteractive.ml?cvsroot=mldonkey&r1=1.150&r2=1.151
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1417
retrieving revision 1.1418
diff -u -b -r1.1417 -r1.1418
--- distrib/ChangeLog 1 Apr 2010 16:03:53 -0000 1.1417
+++ distrib/ChangeLog 2 Apr 2010 09:46:06 -0000 1.1418
@@ -14,6 +14,9 @@
ChangeLog
=========
+2010/04/02
+7151: BT: html ui tweaks (ygrek)
+
2010/04/01
7150: BT: track torrents created with compute_torrent (ygrek)
Index: src/networks/bittorrent/bTClients.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTClients.ml,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- src/networks/bittorrent/bTClients.ml 27 Mar 2010 13:24:50 -0000
1.101
+++ src/networks/bittorrent/bTClients.ml 2 Apr 2010 09:46:06 -0000
1.102
@@ -1515,7 +1515,8 @@
lprintf_file_nl (as_file file) "recover shared";
(try talk_to_tracker file false with _ -> ())
| FilePaused -> () (*when we are paused we do nothing, not even
logging this vvvv*)
- | s -> lprintf_file_nl (as_file file) "recover: Other state %s!!"
(string_of_state s)
+ | FileQueued -> ()
+ | s -> if !verbose then lprintf_file_nl (as_file file) "recover:
Other state %s!!" (string_of_state s)
) !current_files
let upload_buffer = String.create 100000
Index: src/networks/bittorrent/bTInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -b -r1.150 -r1.151
--- src/networks/bittorrent/bTInteractive.ml 1 Apr 2010 16:03:53 -0000
1.150
+++ src/networks/bittorrent/bTInteractive.ml 2 Apr 2010 09:46:06 -0000
1.151
@@ -173,6 +173,10 @@
end
end
+let auto_links =
+ let re = Str.regexp_case_fold
"\\(https?://[a-zA-Z0-9_.!~*'();/?:@&=+$,%-]+\\)" in
+ fun s -> Str.global_replace re "\\<a href=\\\"\\1\\\"\\>\\1\\</a\\>" s
+
let op_file_print file o =
let buf = o.conn_buf in
@@ -229,14 +233,14 @@
("Comment", "sr br", "Comment");
("", "sr", match file.file_comment with
"" -> "-"
- | _ -> file.file_comment) ];
+ | s -> auto_links s) ];
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>" (html_mods_cntr
());
html_mods_td buf [
("Created by", "sr br", "Created by");
("", "sr", match file.file_created_by with
"" -> "-"
- | _ -> file.file_created_by) ];
+ | s -> auto_links s) ];
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>" (html_mods_cntr
());
html_mods_td buf [
@@ -248,7 +252,7 @@
("Modified by", "sr br", "Modified by");
("", "sr", match file.file_modified_by with
"" -> "-"
- | _ -> file.file_modified_by) ];
+ | s -> auto_links s) ];
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>" (html_mods_cntr
());
html_mods_td buf [
@@ -270,18 +274,27 @@
else begin
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>"
(html_mods_cntr ());
html_mods_td buf [
- ("Last Connect", "sr br", "Last Connect");
+ ("Last Tracker Announce", "sr br", "Last Announce");
("", "sr", string_of_date t.tracker_last_conn) ];
+ if t.tracker_last_conn > 1 then
+ begin
+ Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>"
(html_mods_cntr ());
+ html_mods_td buf [
+ ("Next Tracker Announce (planned)", "sr br", "Next Announce");
+ ("", "sr", string_of_date (t.tracker_last_conn +
t.tracker_interval)) ];
+ end;
+
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>"
(html_mods_cntr ());
html_mods_td buf [
- ("Connect Interval", "sr br", "Con Interval");
- ("", "sr", Printf.sprintf "%d" t.tracker_interval) ];
+ ("Tracker Announce Interval", "sr br", "Announce Interval");
+ ("", "sr", Printf.sprintf "%d seconds" t.tracker_interval) ];
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>"
(html_mods_cntr ());
html_mods_td buf [
- ("Connect Min Interval", "sr br", "Con Min Interval");
- ("", "sr", Printf.sprintf "%d" t.tracker_min_interval) ];
+ ("Minimum Tracker Announce Interval", "sr br", "Min Announce
Interval");
+ ("", "sr", Printf.sprintf "%d seconds" t.tracker_min_interval) ];
+
(* show only interesting answers*)
if t.tracker_torrent_downloaded > 0 then begin
Printf.bprintf buf "\\</tr\\>\\<tr class=\\\"dl-%d\\\"\\>"
(html_mods_cntr ());
@@ -371,7 +384,8 @@
];
incr cntr;
) file.file_files
- end else begin
+ end (* use_html_mods *)
+ else begin
Printf.bprintf buf "Trackers:\n";
List.iter (fun tracker ->