diff options
author | Ron Yorston <rmy@pobox.com> | 2014-03-16 10:05:53 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-03-16 10:05:53 +0000 |
commit | 637c0772f7a1cdb08ff26e0added72470f6e392b (patch) | |
tree | 6efe049162e1752b700469491e8f34da4e59600d | |
parent | e8c9f63c8e618d85104369a4c588129b165851e2 (diff) | |
download | busybox-w32-637c0772f7a1cdb08ff26e0added72470f6e392b.tar.gz busybox-w32-637c0772f7a1cdb08ff26e0added72470f6e392b.tar.bz2 busybox-w32-637c0772f7a1cdb08ff26e0added72470f6e392b.zip |
wget: add fseek calls to make ftp work; enable ftpget/ftpput
-rw-r--r-- | configs/mingw32_defconfig | 8 | ||||
-rw-r--r-- | networking/ftpgetput.c | 6 | ||||
-rw-r--r-- | networking/wget.c | 6 |
3 files changed, 16 insertions, 4 deletions
diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig index 05d69109d..b0db59d21 100644 --- a/configs/mingw32_defconfig +++ b/configs/mingw32_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.23.0.git | 3 | # Busybox version: 1.23.0.git |
4 | # Wed Mar 12 20:11:13 2014 | 4 | # Sun Mar 16 09:56:30 2014 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -756,9 +756,9 @@ CONFIG_STRINGS=y | |||
756 | # CONFIG_FTPD is not set | 756 | # CONFIG_FTPD is not set |
757 | # CONFIG_FEATURE_FTP_WRITE is not set | 757 | # CONFIG_FEATURE_FTP_WRITE is not set |
758 | # CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set | 758 | # CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set |
759 | # CONFIG_FTPGET is not set | 759 | CONFIG_FTPGET=y |
760 | # CONFIG_FTPPUT is not set | 760 | CONFIG_FTPPUT=y |
761 | # CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set | 761 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y |
762 | # CONFIG_HOSTNAME is not set | 762 | # CONFIG_HOSTNAME is not set |
763 | # CONFIG_HTTPD is not set | 763 | # CONFIG_HTTPD is not set |
764 | # CONFIG_FEATURE_HTTPD_RANGES is not set | 764 | # CONFIG_FEATURE_HTTPD_RANGES is not set |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 8283366cc..0670b2141 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -100,6 +100,9 @@ static int ftpcmd(const char *s1, const char *s2) | |||
100 | fprintf(control_stream, (s2 ? "%s %s\r\n" : "%s %s\r\n"+3), | 100 | fprintf(control_stream, (s2 ? "%s %s\r\n" : "%s %s\r\n"+3), |
101 | s1, s2); | 101 | s1, s2); |
102 | fflush(control_stream); | 102 | fflush(control_stream); |
103 | #if ENABLE_PLATFORM_MINGW32 | ||
104 | fseek(control_stream, 0L, SEEK_CUR); | ||
105 | #endif | ||
103 | } | 106 | } |
104 | 107 | ||
105 | do { | 108 | do { |
@@ -108,6 +111,9 @@ static int ftpcmd(const char *s1, const char *s2) | |||
108 | ftp_die(NULL); | 111 | ftp_die(NULL); |
109 | } | 112 | } |
110 | } while (!isdigit(buf[0]) || buf[3] != ' '); | 113 | } while (!isdigit(buf[0]) || buf[3] != ' '); |
114 | #if ENABLE_PLATFORM_MINGW32 | ||
115 | fseek(control_stream, 0L, SEEK_CUR); | ||
116 | #endif | ||
111 | 117 | ||
112 | buf[3] = '\0'; | 118 | buf[3] = '\0'; |
113 | n = xatou(buf); | 119 | n = xatou(buf); |
diff --git a/networking/wget.c b/networking/wget.c index e68397693..f13ca1c74 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -258,11 +258,17 @@ static int ftpcmd(const char *s1, const char *s2, FILE *fp) | |||
258 | fprintf(fp, "%s%s\r\n", s1, s2); | 258 | fprintf(fp, "%s%s\r\n", s1, s2); |
259 | fflush(fp); | 259 | fflush(fp); |
260 | log_io("> %s%s", s1, s2); | 260 | log_io("> %s%s", s1, s2); |
261 | #if ENABLE_PLATFORM_MINGW32 | ||
262 | fseek(fp, 0L, SEEK_CUR); | ||
263 | #endif | ||
261 | } | 264 | } |
262 | 265 | ||
263 | do { | 266 | do { |
264 | fgets_and_trim(fp); | 267 | fgets_and_trim(fp); |
265 | } while (!isdigit(G.wget_buf[0]) || G.wget_buf[3] != ' '); | 268 | } while (!isdigit(G.wget_buf[0]) || G.wget_buf[3] != ' '); |
269 | #if ENABLE_PLATFORM_MINGW32 | ||
270 | fseek(fp, 0L, SEEK_CUR); | ||
271 | #endif | ||
266 | 272 | ||
267 | G.wget_buf[3] = '\0'; | 273 | G.wget_buf[3] = '\0'; |
268 | result = xatoi_positive(G.wget_buf); | 274 | result = xatoi_positive(G.wget_buf); |