summaryrefslogtreecommitdiff
path: root/net/mldonkey-devel/files
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2005-08-30 02:06:28 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2005-08-30 02:06:28 +0000
commitc5a06cfd342c27425960d12cc1f82d0c262f3a7d (patch)
tree898b90b41e6f5de78c0016e85dbb20ab70b24880 /net/mldonkey-devel/files
parent- Update to 2.7.8 (diff)
Update to 2.6.3
Notes
Notes: svn path=/head/; revision=141383
Diffstat (limited to 'net/mldonkey-devel/files')
-rw-r--r--net/mldonkey-devel/files/patch-src::daemon::common::commonGlobals.ml24
-rw-r--r--net/mldonkey-devel/files/patch-src::networks::bittorrent::bTClients.ml48
-rw-r--r--net/mldonkey-devel/files/patch-src::networks::donkey::donkeyOneFile.ml20
3 files changed, 92 insertions, 0 deletions
diff --git a/net/mldonkey-devel/files/patch-src::daemon::common::commonGlobals.ml b/net/mldonkey-devel/files/patch-src::daemon::common::commonGlobals.ml
new file mode 100644
index 000000000000..6be3259d9bc1
--- /dev/null
+++ b/net/mldonkey-devel/files/patch-src::daemon::common::commonGlobals.ml
@@ -0,0 +1,24 @@
+--- src/daemon/common/commonGlobals.ml 28 Aug 2005 12:18:30 -0000 1.50
++++ src/daemon/common/commonGlobals.ml 29 Aug 2005 00:03:36 -0000
+@@ -278,7 +278,7 @@
+
+ let download_control = TcpBufferedSocket.create_read_bandwidth_controler
+ "Download"
+- (!!max_hard_download_rate * 2048) (* TODO: changed from 1024 to 2048 because of bug *)
++ (!!max_hard_download_rate * 1024)
+
+
+ let _ =
+@@ -288,7 +288,7 @@
+ option_hook max_hard_download_rate (fun _ ->
+ let rate = !!max_hard_download_rate in
+ TcpBufferedSocket.change_rate download_control
+- (rate * 2048)) (* TODO: changed from 1024 to 2048 because of bug *)
++ (rate * 1024))
+
+ let udp_write_controler = UdpSocket.new_bandwidth_controler upload_control
+
+Index: src/networks/bittorrent/bTClients.ml
+===================================================================
+RCS file: /cvsroot/mldonkey/mldonkey/src/networks/bittorrent/bTClients.ml,v
+retrieving revision 1.48
diff --git a/net/mldonkey-devel/files/patch-src::networks::bittorrent::bTClients.ml b/net/mldonkey-devel/files/patch-src::networks::bittorrent::bTClients.ml
new file mode 100644
index 000000000000..82017869e17a
--- /dev/null
+++ b/net/mldonkey-devel/files/patch-src::networks::bittorrent::bTClients.ml
@@ -0,0 +1,48 @@
+--- src/networks/bittorrent/bTClients.ml 15 Aug 2005 20:30:11 -0000 1.48
++++ src/networks/bittorrent/bTClients.ml 29 Aug 2005 00:42:36 -0000
+@@ -763,13 +763,9 @@
+ Int64Swarmer.downloaded swarmer in
+
+ (*Update rate and amount of data received from client*)
+- c.client_downloaded <- c.client_downloaded ++
+- (new_downloaded -- old_downloaded);
++ count_download c file (new_downloaded -- old_downloaded);
+ (* use len here with max_dr quickfix *)
+ Rate.update c.client_downloaded_rate (float_of_int len);
+- (* update the stats *)
+- let len64 = Int64.of_int len in
+- count_download c file len64;
+ network_must_update network;
+ if !verbose_msg_clients then
+ (match c.client_ranges_sent with
+@@ -1455,14 +1451,13 @@
+ let file = c.client_file in
+ let offset = pos ++ file.file_piece_size *.. num in
+ c.client_allowed_to_write <- c.client_allowed_to_write -- len;
+- c.client_uploaded <- c.client_uploaded ++ len;
++ count_upload c file len;
+ let len = Int64.to_int len in
+ CommonUploads.consume_bandwidth len;
+ (* lprintf "Unix32.read: offset %Ld len %d\n" offset len; *)
+ Unix32.read (file_fd file) offset upload_buffer 0 len;
+ (* update upload rate from len bytes *)
+- (* will be reverted to len instead of len / 2 when rate bug will be fixed *)
+- Rate.update c.client_upload_rate (float_of_int (len / 2));
++ Rate.update c.client_upload_rate (float_of_int len);
+ file.file_uploaded <- file.file_uploaded ++ (Int64.of_int len);
+ let _ =
+ (* update stats *)
+@@ -1477,9 +1472,6 @@
+ in
+ (* lprintf "sending piece\n"; *)
+ send_client c (Piece (num, pos, upload_buffer, 0, len));
+- (* update stats *)
+- let uploaded = Int64.of_int len in
+- count_upload c file uploaded;
+ network_must_update network;
+ iter_upload sock c
+ end else
+Index: src/networks/donkey/donkeyOneFile.ml
+===================================================================
+RCS file: /cvsroot/mldonkey/mldonkey/src/networks/donkey/donkeyOneFile.ml,v
+retrieving revision 1.26
diff --git a/net/mldonkey-devel/files/patch-src::networks::donkey::donkeyOneFile.ml b/net/mldonkey-devel/files/patch-src::networks::donkey::donkeyOneFile.ml
new file mode 100644
index 000000000000..6d56249f8954
--- /dev/null
+++ b/net/mldonkey-devel/files/patch-src::networks::donkey::donkeyOneFile.ml
@@ -0,0 +1,20 @@
+--- src/networks/donkey/donkeyOneFile.ml 18 Aug 2005 13:00:03 -0000 1.26
++++ src/networks/donkey/donkeyOneFile.ml 29 Aug 2005 00:04:10 -0000
+@@ -429,7 +429,6 @@
+
+ set_client_state c (Connected_downloading (file_num file));
+ let len64 = Int64.of_int bloc_len in
+- count_download c file len64;
+ network_must_update network;
+
+ (* TODO: verify the received data has been requested *)
+@@ -462,8 +461,7 @@
+ (* List.iter Int64Swarmer.alloc_range c.client_ranges; *)
+ let new_downloaded =
+ Int64Swarmer.downloaded swarmer in
+- c.client_downloaded <- c.client_downloaded ++ (
+- new_downloaded -- old_downloaded);
++ count_download c file (new_downloaded -- old_downloaded);
+ (*
+ if not (List.mem c.client_ip bb.block_contributors) then
+ bb.block_contributors <- c.client_ip ::