[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: |
Tue, 06 Feb 2007 22:26:59 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 07/02/06 22:26:59
Modified files:
distrib : ChangeLog
src/daemon/common: commonComplexOptions.ml commonGlobals.ml
commonInteractive.ml commonShared.ml
src/daemon/driver: driverCommands.ml driverInteractive.ml
src/utils/cdk : unix2.ml zip.ml
src/utils/lib : misc.ml syslog.ml unix32.ml
Log message:
patch #5719
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1173&r2=1.1174
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonComplexOptions.ml?cvsroot=mldonkey&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonGlobals.ml?cvsroot=mldonkey&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonInteractive.ml?cvsroot=mldonkey&r1=1.89&r2=1.90
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonShared.ml?cvsroot=mldonkey&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.219&r2=1.220
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverInteractive.ml?cvsroot=mldonkey&r1=1.125&r2=1.126
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/cdk/unix2.ml?cvsroot=mldonkey&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/cdk/zip.ml?cvsroot=mldonkey&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/lib/misc.ml?cvsroot=mldonkey&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/lib/syslog.ml?cvsroot=mldonkey&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/lib/unix32.ml?cvsroot=mldonkey&r1=1.66&r2=1.67
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1173
retrieving revision 1.1174
diff -u -b -r1.1173 -r1.1174
--- distrib/ChangeLog 4 Feb 2007 17:27:45 -0000 1.1173
+++ distrib/ChangeLog 6 Feb 2007 22:26:58 -0000 1.1174
@@ -14,6 +14,10 @@
ChangeLog
=========
+2007/02/06
+5719: Unix2: Fix copying files > 1GB (1073741823 bytes),
+ bug was introduced by patch 5589 after release of 2.8.2
+
2007/02/04
5724: http_client: Retry GET request if HEAD request returns http error 400
5723: HTML: print tracker errors in html table at 'vd <num>' (Schlumpf)
Index: src/daemon/common/commonComplexOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.ml,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- src/daemon/common/commonComplexOptions.ml 21 Nov 2006 22:34:33 -0000
1.69
+++ src/daemon/common/commonComplexOptions.ml 6 Feb 2007 22:26:58 -0000
1.70
@@ -962,8 +962,6 @@
[default_incoming_directories]
| l -> l
-exception Incoming_full
-
let incoming_dir usedir ?user ?needed_space ?network () =
let directories =
@@ -994,12 +992,13 @@
in
let checkdir =
+ let module U = Unix.LargeFile in
try
List.find (fun d ->
let dirname = compute_dir_name d.shdir_dirname in
(* check if temp_directory and incoming are on different partitions *)
try
- if (Unix.stat dirname).Unix.st_dev <> (Unix.stat
!!temp_directory).Unix.st_dev then
+ if (U.stat dirname).U.st_dev <> (U.stat !!temp_directory).U.st_dev
then
begin
match needed_space with
| None -> true
@@ -1100,8 +1099,9 @@
Unix2.tryopen_write_zip archive (fun oc ->
List.iter (fun file ->
try
- let s = Unix.stat file in
- Zip.copy_file_to_entry file oc ~level:9 ~mtime:s.Unix.st_mtime file
+ let module U = Unix.LargeFile in
+ let s = U.stat file in
+ Zip.copy_file_to_entry file oc ~level:9 ~mtime:s.U.st_mtime file
with e ->
failwith (Printf.sprintf "Zip: error %s in %s" (Printexc2.to_string
e) file)
) files)
Index: src/daemon/common/commonGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonGlobals.ml,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- src/daemon/common/commonGlobals.ml 30 Jan 2007 21:23:01 -0000 1.80
+++ src/daemon/common/commonGlobals.ml 6 Feb 2007 22:26:58 -0000 1.81
@@ -263,6 +263,7 @@
let user_socks = ref ([] : TcpBufferedSocket.t list)
let dialog_history = ref ([] : (int * string * string) list )
+exception Incoming_full
let want_and_not andnot f none value =
(* lprintf "want_and_not [%s]\n" value; *)
Index: src/daemon/common/commonInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonInteractive.ml,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- src/daemon/common/commonInteractive.ml 21 Jan 2007 15:19:36 -0000
1.89
+++ src/daemon/common/commonInteractive.ml 6 Feb 2007 22:26:58 -0000
1.90
@@ -200,8 +200,6 @@
name.
*)
-exception Incoming_full
-
let file_commit file =
let impl = as_file_impl file in
if impl.impl_file_state = FileDownloaded then
Index: src/daemon/common/commonShared.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonShared.ml,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- src/daemon/common/commonShared.ml 3 Dec 2006 20:57:56 -0000 1.38
+++ src/daemon/common/commonShared.ml 6 Feb 2007 22:26:58 -0000 1.39
@@ -247,14 +247,15 @@
waiting_directories := (shared_dir, local_dir) :: !waiting_directories
let shared_scan_directory shared_dir local_dir =
+ let module U = Unix.LargeFile in
let incoming_files_inode =
- ((Unix.stat ((CommonComplexOptions.incoming_dir false
()).shdir_dirname)).Unix.st_ino)
+ ((U.stat ((CommonComplexOptions.incoming_dir false
()).shdir_dirname)).U.st_ino)
in
let incoming_directories_inode =
- ((Unix.stat ((CommonComplexOptions.incoming_dir true
()).shdir_dirname)).Unix.st_ino)
+ ((U.stat ((CommonComplexOptions.incoming_dir true
()).shdir_dirname)).U.st_ino)
in
let temp_directory_inode =
- ((Unix.stat !!temp_directory).Unix.st_ino)
+ ((U.stat !!temp_directory).U.st_ino)
in
let dirname = shared_dir.shdir_dirname in
let strategy =
Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -b -r1.219 -r1.220
--- src/daemon/driver/driverCommands.ml 4 Feb 2007 17:22:18 -0000 1.219
+++ src/daemon/driver/driverCommands.ml 6 Feb 2007 22:26:58 -0000 1.220
@@ -2176,9 +2176,9 @@
| Some p -> Printf.sprintf "%d%%" p in
Printf.bprintf buf "percentused %s\n" (print_percento
(Unix32.percentused arg));
Printf.bprintf buf "percentfree %s\n" (print_percento
(Unix32.percentfree arg));
- let stat = Unix.stat arg in
- Printf.bprintf buf "\nstat_device %d\n" stat.Unix.st_dev;
- Printf.bprintf buf "stat_inode %d\n" stat.Unix.st_ino;
+ let stat = Unix.LargeFile.stat arg in
+ Printf.bprintf buf "\nstat_device %d\n" stat.Unix.LargeFile.st_dev;
+ Printf.bprintf buf "stat_inode %d\n" stat.Unix.LargeFile.st_ino;
_s ""
), "debug command (example: disk .)";
@@ -2203,15 +2203,16 @@
"debug_fileinfo", Arg_one (fun arg o ->
let buf = o.conn_buf in
(try
- let s = Unix.stat arg in
- Printf.bprintf buf "st_dev %d\n" s.Unix.st_dev;
- Printf.bprintf buf "st_ino %d\n" s.Unix.st_ino;
- Printf.bprintf buf "st_uid %d\n" s.Unix.st_uid;
- Printf.bprintf buf "st_gid %d\n" s.Unix.st_gid;
- Printf.bprintf buf "st_size %d\n" s.Unix.st_size;
- Printf.bprintf buf "st_atime %s\n" (Date.to_full_string
s.Unix.st_atime);
- Printf.bprintf buf "st_mtime %s\n" (Date.to_full_string
s.Unix.st_mtime);
- Printf.bprintf buf "st_ctime %s\n" (Date.to_full_string
s.Unix.st_ctime);
+ let module U = Unix.LargeFile in
+ let s = U.stat arg in
+ Printf.bprintf buf "st_dev %d\n" s.U.st_dev;
+ Printf.bprintf buf "st_ino %d\n" s.U.st_ino;
+ Printf.bprintf buf "st_uid %d\n" s.U.st_uid;
+ Printf.bprintf buf "st_gid %d\n" s.U.st_gid;
+ Printf.bprintf buf "st_size %Ld\n" s.U.st_size;
+ Printf.bprintf buf "st_atime %s\n" (Date.to_full_string
s.U.st_atime);
+ Printf.bprintf buf "st_mtime %s\n" (Date.to_full_string
s.U.st_mtime);
+ Printf.bprintf buf "st_ctime %s\n" (Date.to_full_string
s.U.st_ctime);
let user,group = Unix32.owner arg in
Printf.bprintf buf "username %s\n" user;
Printf.bprintf buf "groupname %s\n" group;
Index: src/daemon/driver/driverInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverInteractive.ml,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -b -r1.125 -r1.126
--- src/daemon/driver/driverInteractive.ml 4 Feb 2007 17:21:05 -0000
1.125
+++ src/daemon/driver/driverInteractive.ml 6 Feb 2007 22:26:58 -0000
1.126
@@ -2039,10 +2039,11 @@
tack list
(
"",
- Printf.sprintf "\t\t max_string_length: %d - word_size: %d -
max_array_length: %d"
+ Printf.sprintf "\t\t max_string_length: %d - word_size: %d -
max_array_length: %d - max_int: %d"
Sys.max_string_length
Sys.word_size
Sys.max_array_length
+ Pervasives.max_int
);
tack list
(
Index: src/utils/cdk/unix2.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/cdk/unix2.ml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- src/utils/cdk/unix2.ml 28 Nov 2006 23:52:17 -0000 1.32
+++ src/utils/cdk/unix2.ml 6 Feb 2007 22:26:59 -0000 1.33
@@ -78,10 +78,10 @@
with End_of_file -> ())
let is_directory filename =
- try let s = Unix.stat filename in s.st_kind = S_DIR with _ -> false
+ try let s = Unix.LargeFile.stat filename in s.LargeFile.st_kind = S_DIR with
_ -> false
let is_link filename =
- try let s = Unix.lstat filename in s.st_kind = S_LNK with _ -> false
+ try let s = Unix.LargeFile.lstat filename in s.LargeFile.st_kind = S_LNK
with _ -> false
let chmod f o =
try
@@ -136,12 +136,12 @@
let copy oldname newname =
tryopen_read_bin oldname (fun ic ->
- let stats = Unix.fstat (Unix.descr_of_in_channel ic) in
+ let stats = Unix.LargeFile.fstat (Unix.descr_of_in_channel ic) in
tryopen_write_bin newname (fun oc ->
let descr = Unix.descr_of_out_channel oc in
- (try Unix.fchown descr stats.Unix.st_uid stats.Unix.st_gid
+ (try Unix.fchown descr stats.Unix.LargeFile.st_uid
stats.Unix.LargeFile.st_gid
with e -> lprintf_nl "copy: failed to preserve owner");
- (try Unix.fchmod descr stats.Unix.st_perm
+ (try Unix.fchmod descr stats.Unix.LargeFile.st_perm
with e -> lprintf_nl "copy: failed to preserve mode");
let buffer_len = 8192 in
let buffer = String.create buffer_len in
Index: src/utils/cdk/zip.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/cdk/zip.ml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/utils/cdk/zip.ml 20 Jul 2006 11:33:58 -0000 1.7
+++ src/utils/cdk/zip.ml 6 Feb 2007 22:26:59 -0000 1.8
@@ -10,7 +10,7 @@
(* *)
(***********************************************************************)
-(* $Id: zip.ml,v 1.7 2006/07/20 11:33:58 spiralvoice Exp $ *)
+(* $Id: zip.ml,v 1.8 2007/02/06 22:26:59 spiralvoice Exp $ *)
(* Module [Zip]: reading and writing ZIP archives *)
@@ -544,7 +544,7 @@
match mtime with
Some t -> mtime
| None ->
- try Some((Unix.stat infilename).Unix.st_mtime)
+ try Some((Unix.LargeFile.stat infilename).Unix.LargeFile.st_mtime)
with Unix.Unix_error(_,_,_) -> None in
try
copy_channel_to_entry ic ofile ~extra ~comment ~level ?mtime:mtime' name;
Index: src/utils/lib/misc.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/lib/misc.ml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/utils/lib/misc.ml 25 Oct 2006 11:12:38 -0000 1.7
+++ src/utils/lib/misc.ml 6 Feb 2007 22:26:59 -0000 1.8
@@ -67,12 +67,13 @@
List.iter (zip_extract_entry ic) (Zip.entries ic))
let rec zip_add_entry oc file =
- let s = Unix.stat file in
- match s.Unix.st_kind with
+ let module U = Unix.LargeFile in
+ let s = U.stat file in
+ match s.U.st_kind with
Unix.S_REG ->
- Zip.copy_file_to_entry file oc ~mtime:s.Unix.st_mtime file
+ Zip.copy_file_to_entry file oc ~mtime:s.U.st_mtime file
| Unix.S_DIR ->
- Zip.add_entry "" oc ~mtime:s.Unix.st_mtime
+ Zip.add_entry "" oc ~mtime:s.U.st_mtime
(if Filename.check_suffix file "/" then file else file ^ "/");
Unix2.tryopen_dir file (fun d ->
try
Index: src/utils/lib/syslog.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/lib/syslog.ml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/utils/lib/syslog.ml 24 Jul 2006 20:15:16 -0000 1.2
+++ src/utils/lib/syslog.ml 6 Feb 2007 22:26:59 -0000 1.3
@@ -124,10 +124,11 @@
}
let open_connection loginfo =
+ let module U = Unix.LargeFile in
match loginfo.logpath with
"" -> raise (Syslog_error "unable to find the syslog socket or pipe, is
syslogd running?")
| logpath ->
- (match (Unix.stat logpath).Unix.st_kind with
+ (match (U.stat logpath).U.st_kind with
Unix.S_SOCK ->
let logaddr = Unix.ADDR_UNIX logpath in
(try
Index: src/utils/lib/unix32.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/lib/unix32.ml,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- src/utils/lib/unix32.ml 28 Nov 2006 23:52:18 -0000 1.66
+++ src/utils/lib/unix32.ml 6 Feb 2007 22:26:59 -0000 1.67
@@ -206,9 +206,9 @@
let owner t =
try
check_destroyed t;
- let s = Unix.fstat (local_force_fd t) in
- let user = Unix.getpwuid s.Unix.st_uid in
- let group = Unix.getgrgid s.Unix.st_gid in
+ let s = Unix.LargeFile.fstat (local_force_fd t) in
+ let user = Unix.getpwuid s.Unix.LargeFile.st_uid in
+ let group = Unix.getgrgid s.Unix.LargeFile.st_gid in
user.Unix.pw_name, group.Unix.gr_name
with e ->
if !verbose then lprintf_nl "Exception in FDCache.owner %s: %s"