diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-09-03 22:02:40 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-09-03 22:02:40 +0000 |
commit | f2d422235b0bf7dc6e7179143296a5e4abf8b9ed (patch) | |
tree | 27de1368f21ba3bb8fbadc9f1ae20a7ab90898f7 /lib/ftp.c | |
parent | 6a678f6d64b287eaf58186108a4cf9f1fcff8990 (diff) |
Early Ehlinger's CURLOPT_FTP_RESPONSE_TIMEOUT patch applied.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -233,7 +233,15 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ while((*nreadp<BUFSIZE) && (keepon && !result)) { /* check and reset timeout value every lap */ - if(data->set.timeout) + if(data->set.ftp_response_timeout ) + /* if CURLOPT_FTP_RESPONSE_TIMEOUT is set, use that to determine + remaining time. Also, use "now" as opposed to "conn->now" + because ftp_response_timeout is only supposed to govern + the response for any given ftp response, not for the time + from connect to the given ftp response. */ + timeout = data->set.ftp_response_timeout - /* timeout time */ + Curl_tvdiff(Curl_tvnow(), now)/1000; /* spent time */ + else if(data->set.timeout) /* if timeout is requested, find out how much remaining time we have */ timeout = data->set.timeout - /* timeout time */ Curl_tvdiff(Curl_tvnow(), conn->now)/1000; /* spent time */ |