1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

imap: Updated setting of transfer variables in imap_state_fetch_resp()

Add number of bytes retrieved from the PP cache to req.bytecount and set
req.maxdownload only when starting a proper download.
This commit is contained in:
Jiri Hruska 2013-03-01 19:38:27 +01:00 committed by Steve Holme
parent 25884aa197
commit d46d107e0c

View File

@ -1294,6 +1294,7 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
if(result)
return result;
data->req.bytecount += chunk;
size -= chunk;
infof(data, "Written %" FORMAT_OFF_TU " bytes, %" FORMAT_OFF_TU
@ -1317,11 +1318,11 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
if(!size)
/* The entire data is already transferred! */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
else
else {
/* IMAP download */
data->req.maxdownload = size;
Curl_setup_transfer(conn, FIRSTSOCKET, size, FALSE, NULL, -1, NULL);
data->req.maxdownload = size;
}
}
else {
/* We don't know how to parse this line */