update to newer version, after checking it works fine.

This commit is contained in:
espie 2007-04-19 23:04:53 +00:00
parent dd24323277
commit adb9078418
8 changed files with 20 additions and 153 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.18 2007/02/02 19:28:52 espie Exp $
# $OpenBSD: Makefile,v 1.19 2007/04/19 23:04:53 espie Exp $
COMMENT= 'e-donkey client'
CATEGORIES= net
@ -14,14 +14,14 @@ WANTLIB= X11 Xext Xi c glib gmodule iconv intl m z pthread \
freetype png jpeg charset stdc++ fontconfig
CONFIGURE_STYLE= autoconf no-autoheader
AUTOCONF_DIR= ${WRKSRC}/config
AUTOCONF_VERSION= 2.59
AUTOCONF_VERSION= 2.61
#CONFIGURE_ARGS+= --enable-ocamlver=3.07
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/config
HOMEPAGE= http://mldonkey.sourceforge.net/Main_Page
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mldonkey/}
DISTNAME= mldonkey-2.8.2
DISTNAME= mldonkey-2.8.4
PKGNAME= ${DISTNAME}
EXTRACT_SUFX= .tar.bz2

View File

@ -1,5 +1,5 @@
MD5 (mldonkey-2.8.2.tar.bz2) = EjrreaPKkaSUO1nwROmNSg==
RMD160 (mldonkey-2.8.2.tar.bz2) = zpUYSAWsj0xpDjfHXUGLX34mX5I=
SHA1 (mldonkey-2.8.2.tar.bz2) = UQ+thrTIO1Sn6INs7Do/MNZ67Yo=
SHA256 (mldonkey-2.8.2.tar.bz2) = Ue/Bwzm4y6/ek/RETxjkJD9BAIscQQekFgJULp7qpo4=
SIZE (mldonkey-2.8.2.tar.bz2) = 2652074
MD5 (mldonkey-2.8.4.tar.bz2) = 3+C/do6ozS9QlLHLyNdGmw==
RMD160 (mldonkey-2.8.4.tar.bz2) = cp6AGLvwnIcH43Ey9oJ7Rp9Z+qw=
SHA1 (mldonkey-2.8.4.tar.bz2) = GTTvv5AKihX0cQiiepheI2O3b/w=
SHA256 (mldonkey-2.8.4.tar.bz2) = cdBp3/cWSemJeDkRWBQKVMTnKtJUXkApjRLeRECphyA=
SIZE (mldonkey-2.8.4.tar.bz2) = 2665209

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-config_Makefile_in,v 1.7 2006/10/27 07:23:50 espie Exp $
--- config/Makefile.in.orig Wed Aug 16 21:08:21 2006
+++ config/Makefile.in Thu Oct 26 20:29:09 2006
@@ -754,6 +754,8 @@ uninstall::
$OpenBSD: patch-config_Makefile_in,v 1.8 2007/04/19 23:04:53 espie Exp $
--- config/Makefile.in.orig Sun Mar 25 14:37:09 2007
+++ config/Makefile.in Mon Apr 16 20:11:46 2007
@@ -748,6 +748,8 @@ uninstall::
rm -f $(BINDIR)/mlnet
rm -f $(BINDIR)/mlgui
@ -10,7 +10,7 @@ $OpenBSD: patch-config_Makefile_in,v 1.7 2006/10/27 07:23:50 espie Exp $
install:: opt
mkdir -p $(DESTDIR)$(prefix)/bin
if test -f mlnet; then \
@@ -773,6 +775,21 @@ install:: opt
@@ -767,6 +769,21 @@ install:: opt
done; \
fi

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-config_configure_in,v 1.5 2007/02/02 19:28:52 espie Exp $
--- config/configure.in.orig Wed Nov 29 00:17:31 2006
+++ config/configure.in Fri Feb 2 13:50:33 2007
@@ -850,7 +850,7 @@ if test "$GD" != "no"; then
$OpenBSD: patch-config_configure_in,v 1.6 2007/04/19 23:04:53 espie Exp $
--- config/configure.in.orig Sun Apr 1 15:11:52 2007
+++ config/configure.in Mon Apr 16 20:11:41 2007
@@ -856,7 +856,7 @@ if test "$GD" != "no"; then
PNG_LDFLAGS=`$PNGLIBCONFIG --ldflags`
LDFLAGS="$LDFLAGS $PNG_LDFLAGS"
fi
@ -10,7 +10,7 @@ $OpenBSD: patch-config_configure_in,v 1.5 2007/02/02 19:28:52 espie Exp $
# restore variables
LIBS=$SAVE_LIBS_PNG
CFLAGS=$SAVE_CFLAGS_PNG
@@ -878,7 +878,7 @@ if test "$GD" != "no"; then
@@ -884,7 +884,7 @@ if test "$GD" != "no"; then
GD=yes
GD_PNG=yes
AC_MSG_RESULT(yes)

View File

@ -1,74 +0,0 @@
$OpenBSD: patch-src_networks_donkey_donkeyClient_ml,v 1.2 2007/02/02 19:28:52 espie Exp $
--- src/networks/donkey/donkeyClient.ml.orig Sun Nov 26 17:36:29 2006
+++ src/networks/donkey/donkeyClient.ml Fri Feb 2 13:51:15 2007
@@ -442,15 +442,17 @@ let client_wants_file c md4 =
let new_chunk up begin_pos end_pos =
if begin_pos <> end_pos then
- let pair = (begin_pos, end_pos) in
- (match up.up_chunks with
- [] ->
+ let chunk = (begin_pos, end_pos) in
+ (* the zone requested is already "in the pipe" *)
+ if not (List.mem chunk up.up_flying_chunks) then
+ match up.up_chunks with
+ | [] ->
up.up_pos <- begin_pos;
up.up_end_chunk <- end_pos;
- up.up_chunks <- [pair];
- | chunks ->
- if not (List.mem pair chunks) then
- up.up_chunks <- chunks @ [pair])
+ up.up_chunks <- [chunk];
+ | up_chunks ->
+ if not (List.mem chunk up_chunks) then
+ up.up_chunks <- up_chunks @ [chunk]
let identify_client_brand c =
if c.client_brand = Brand_unknown then
@@ -2039,13 +2041,21 @@ end else *)
set_rtimeout sock !!upload_timeout;
let up, waiting = match c.client_upload with
- Some ({ up_file = f } as up) when f == file -> up, up.up_waiting
+ | Some ({ up_file = f } as up) when f == file ->
+ (* zones are received in the order they're sent, so we
+ know that the oldest of the zones "in fly" must have
+ been received when this QueryBlockReq was sent *)
+ (match up.up_flying_chunks with
+ | [] -> ()
+ | _ :: q -> up.up_flying_chunks <- q);
+ up, up.up_waiting
| Some old_up ->
{
up_file = file;
up_pos = Int64.zero;
up_end_chunk = Int64.zero;
up_chunks = [];
+ up_flying_chunks = [];
up_waiting = old_up.up_waiting;
}, old_up.up_waiting
| _ ->
@@ -2054,6 +2064,7 @@ end else *)
up_pos = Int64.zero;
up_end_chunk = Int64.zero;
up_chunks = [];
+ up_flying_chunks = [];
up_waiting = false;
}, false
in
@@ -2141,12 +2152,12 @@ make 1500 connections/10 minutes. *)
let init_client sock c =
set_handler sock WRITE_DONE (fun s ->
match c.client_upload with
- None -> ()
- | Some up ->
+ | Some ({ up_chunks = _ :: _ } as up) ->
if not up.up_waiting && !CommonUploads.has_upload = 0 then begin
up.up_waiting <- true;
CommonUploads.ready_for_upload (as_client c)
end
+ | _ -> ()
);
(*
set_handler sock (BASIC_EVENT RTIMEOUT) (fun s ->

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-src_networks_donkey_donkeyFiles_ml,v 1.2 2007/02/02 19:28:52 espie Exp $
--- src/networks/donkey/donkeyFiles.ml.orig Tue Nov 21 23:34:33 2006
+++ src/networks/donkey/donkeyFiles.ml Fri Feb 2 13:51:16 2007
@@ -123,7 +123,7 @@ module NewUpload = struct
(* lprintf "send_client_block\n"; *)
if per_client > 0 && CommonUploads.can_write_len sock max_msg_size then
match c.client_upload with
- | Some ({ up_chunks = _ :: chunks } as up) ->
+ | Some ({ up_chunks = current_chunk :: chunks } as up) ->
if up.up_file.file_shared = None then begin
(* Is there a message to warn that a file is not shared anymore ? *)
c.client_upload <- None;
@@ -134,16 +134,17 @@ module NewUpload = struct
if max_len <= msg_block_size_int then
(* last block from chunk *)
begin
+ send_small_block c sock up.up_file up.up_pos max_len;
if !verbose_upload then
lprintf_nl "End of chunk (%d) %Ld %s" max_len up.up_end_chunk (file_best_name up.up_file);
- send_small_block c sock up.up_file up.up_pos max_len;
+ up.up_flying_chunks <- up.up_flying_chunks @ [current_chunk];
up.up_chunks <- chunks;
let per_client = per_client - max_len in
match chunks with
- [] ->
+ | [] ->
if !verbose_upload then
- lprintf_nl "NO CHUNKS";
- c.client_upload <- None;
+ lprintf_nl "NO MORE CHUNKS";
+ up.up_waiting <- false;
| (begin_pos, end_pos) :: _ ->
up.up_pos <- begin_pos;
up.up_end_chunk <- end_pos;
@@ -168,10 +169,10 @@ module NewUpload = struct
let size = min max_msg_size size in
send_client_block c sock size;
(match c.client_upload with
- None -> ()
- | Some up ->
+ | Some ({ up_chunks = _ :: _ }) ->
if !CommonUploads.has_upload = 0 then
CommonUploads.ready_for_upload (as_client c)
+ | _ -> ()
)
)
let _ =

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_networks_donkey_donkeyTypes_ml,v 1.2 2007/02/02 19:28:52 espie Exp $
--- src/networks/donkey/donkeyTypes.ml.orig Sun Nov 26 17:36:29 2006
+++ src/networks/donkey/donkeyTypes.ml Fri Feb 2 13:51:16 2007
@@ -602,6 +602,8 @@ and upload_info = {
mutable up_pos : int64;
mutable up_end_chunk : int64;
mutable up_chunks : (int64 * int64) list;
+ (* zones sent but not yet received by other peer, oldest first *)
+ mutable up_flying_chunks : (int64 * int64) list;
mutable up_waiting : bool;
}

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.7 2007/02/02 19:28:52 espie Exp $
@comment $OpenBSD: PLIST,v 1.8 2007/04/19 23:04:53 espie Exp $
bin/mlbt
bin/mlbt+gui
bin/mldc
@ -26,7 +26,7 @@ share/mldonkey/distrib/Todo.txt
share/mldonkey/distrib/ed2k_links.txt
share/mldonkey/distrib/ed2k_mozilla/
share/mldonkey/distrib/ed2k_mozilla/README
share/mldonkey/distrib/ed2k_mozilla/mldonkey_protocol_handler-1.8.xpi
share/mldonkey/distrib/ed2k_mozilla/mldonkey_protocol_handler-2.0.xpi
share/mldonkey/distrib/ed2k_submit/
share/mldonkey/distrib/ed2k_submit/README.MLdonkeySubmit
share/mldonkey/distrib/ed2k_submit/ed2k.protocol