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 /networking | |
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
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ftpgetput.c | 6 | ||||
-rw-r--r-- | networking/wget.c | 6 |
2 files changed, 12 insertions, 0 deletions
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); |