svn commit: trunk/busybox/networking
landley at busybox.net
landley at busybox.net
Tue Jan 10 06:36:02 UTC 2006
Author: landley
Date: 2006-01-09 22:36:00 -0800 (Mon, 09 Jan 2006)
New Revision: 13222
Log:
The brain-dead FTP servers on Solaris don't support the size command.
Modified:
trunk/busybox/networking/ftpgetput.c
Changeset:
Modified: trunk/busybox/networking/ftpgetput.c
===================================================================
--- trunk/busybox/networking/ftpgetput.c 2006-01-10 06:19:56 UTC (rev 13221)
+++ trunk/busybox/networking/ftpgetput.c 2006-01-10 06:36:00 UTC (rev 13222)
@@ -143,6 +143,9 @@
if (safe_strtoul(buf + 4, &value))
bb_error_msg_and_die("SIZE error: %s", buf + 4);
filesize = value;
+ } else {
+ filesize = -1;
+ do_continue = 0;
}
if ((local_path[0] == '-') && (local_path[1] == '\0')) {
@@ -185,8 +188,12 @@
}
/* Copy the file */
- if (bb_copyfd_size(fd_data, fd_local, filesize) == -1) {
- exit(EXIT_FAILURE);
+ if (filesize != -1) {
+ if (-1 == bb_copyfd_size(fd_data, fd_local, filesize))
+ exit(EXIT_FAILURE);
+ } else {
+ if (-1 == bb_copyfd_eof(fd_data, fd_local))
+ exit(EXIT_FAILURE);
}
/* close it all down */
More information about the busybox-cvs
mailing list