mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:33:32 +03:00
timeouts: change millisecond timeouts to timediff_t from time_t
For millisecond timers we like timediff_t better. Also, time_t can be unsigned so returning a negative value doesn't work then. Closes #5479
This commit is contained in:
parent
fc55c723c4
commit
842f73de58
15 changed files with 45 additions and 54 deletions
|
|
@ -633,8 +633,8 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
|
|||
|
||||
while(!*ftpcode && !result) {
|
||||
/* check and reset timeout value every lap */
|
||||
time_t timeout = Curl_pp_state_timeout(pp, FALSE);
|
||||
time_t interval_ms;
|
||||
timediff_t timeout = Curl_pp_state_timeout(pp, FALSE);
|
||||
timediff_t interval_ms;
|
||||
|
||||
if(timeout <= 0) {
|
||||
failf(data, "FTP response timeout");
|
||||
|
|
@ -3252,7 +3252,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
|||
* data has been transferred. This happens when doing through NATs etc that
|
||||
* abandon old silent connections.
|
||||
*/
|
||||
long old_time = pp->response_time;
|
||||
timediff_t old_time = pp->response_time;
|
||||
|
||||
pp->response_time = 60*1000; /* give it only a minute for now */
|
||||
pp->response = Curl_now(); /* timeout relative now */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue