aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-06-12 22:05:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-06-12 22:05:28 +0000
commitcae555c977eb1ba14483b22ad7c76ef3cefdeb41 (patch)
tree04ebe5fcceeb327cfe939fbe8241033b27c3b83f
parent407583e8e275fdfb339c98086d431685024fef90 (diff)
when no FTP transfer was done, don't attempt to read the download transfer
thing. The 'resumed' flag is also causing confusions. I'll deal with that tomorrow.
-rw-r--r--lib/ftp.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 0347e0ccd..29f0129a5 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -656,18 +656,19 @@ CURLcode Curl_ftp_done(struct connectdata *conn)
sclose(conn->secondarysocket);
conn->secondarysocket = -1;
- /* now let's see what the server says about the transfer we
- just performed: */
- nread = Curl_GetFTPResponse(buf, conn, &ftpcode);
- if(nread < 0)
- return CURLE_OPERATION_TIMEOUTED;
-
- if(!data->set.no_body && !conn->bits.resume_done) {
+ if(!data->set.no_body) {
+ /* now let's see what the server says about the transfer we just
+ performed: */
+ nread = Curl_GetFTPResponse(buf, conn, &ftpcode);
+ if(nread < 0)
+ return CURLE_OPERATION_TIMEOUTED;
- /* 226 Transfer complete, 250 Requested file action okay, completed. */
- if((ftpcode != 226) && (ftpcode != 250)) {
- failf(data, "server did not report OK, got %d", ftpcode);
- return CURLE_FTP_WRITE_ERROR;
+ if(!conn->bits.resume_done) {
+ /* 226 Transfer complete, 250 Requested file action okay, completed. */
+ if((ftpcode != 226) && (ftpcode != 250)) {
+ failf(data, "server did not report OK, got %d", ftpcode);
+ return CURLE_FTP_WRITE_ERROR;
+ }
}
}