diff options
author | Jiri Hruska <jirka@fud.cz> | 2013-03-01 19:38:27 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-03-02 18:37:56 +0000 |
commit | d46d107e0cc421f74e1ed632b14cc72c2ffb2c14 (patch) | |
tree | 79ce7961f37391430c2ff20ec93d0af36baf2a52 /lib | |
parent | 25884aa1979061749469a61c629adafe9f8d500e (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/imap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/imap.c b/lib/imap.c index 8b00b216d..dcc6d6b6e 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -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 */ |