aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-14 23:14:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-14 23:14:59 +0000
commit4931fbce49887f7d4022c39ea7d94c4294b5f479 (patch)
treede5a20a6d1624ad07fe7509e10900773160d711b /lib/ftp.c
parentfefc7ea6008c48cbc3c346da4da55169da8c3adc (diff)
Curl_read() now returns a negative return code if EWOULDBLOCK or similar
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 1acf2dd7e..2def61f08 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -267,9 +267,16 @@ int Curl_GetFTPResponse(char *buf,
ftp->cache = NULL; /* clear the pointer */
ftp->cache_size = 0; /* zero the size just in case */
}
- else if(CURLE_OK != Curl_read(conn, sockfd, ptr,
- BUFSIZE-nread, &gotbytes))
- keepon = FALSE;
+ else {
+ int res = Curl_read(conn, sockfd, ptr,
+ BUFSIZE-nread, &gotbytes);
+ if(res < 0)
+ /* EWOULDBLOCK */
+ continue; /* go looping again */
+
+ if(CURLE_OK != res)
+ keepon = FALSE;
+ }
if(!keepon)
;