char *buf = data->state.buffer;
curl_off_t bytecount = 0;
int fd;
+ struct timeval now = Curl_tvnow();
/* get the fd from the connection phase */
fd = conn->proto.file->fd;
if(conn->resume_from)
lseek(fd, conn->resume_from, SEEK_SET);
+ Curl_pgrsTime(data, TIMER_STARTTRANSFER);
+
while (res == CURLE_OK) {
nread = read(fd, buf, BUFSIZE-1);
if(res)
return res;
+ Curl_pgrsSetDownloadCounter(data, (double)bytecount);
+
if(Curl_pgrsUpdate(conn))
res = CURLE_ABORTED_BY_CALLBACK;
+ else
+ res = Curl_speedcheck (data, now);
}
if(Curl_pgrsUpdate(conn))
res = CURLE_ABORTED_BY_CALLBACK;