aboutsummaryrefslogtreecommitdiff
path: root/lib/imap.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-04-15 13:49:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-04-26 18:17:10 +0200
commitd5ec44ca4cca9bbe6c21a1d2a94b37cba77661ff (patch)
tree7d4f6429f80bacd0a314726572bdddbc265f7c72 /lib/imap.c
parent9c941e92c4bd3d2a5dbe243f7517b6a6029afc6e (diff)
INFILESIZE: fields in UserDefined must not be changed run-time
set.infilesize in this case was modified in several places, which could lead to repeated requests using the same handle to get unintendent/wrong consequences based on what the previous request did!
Diffstat (limited to 'lib/imap.c')
-rw-r--r--lib/imap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/imap.c b/lib/imap.c
index fc162b6c8..713060352 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -775,7 +775,7 @@ static CURLcode imap_perform_append(struct connectdata *conn)
}
/* Check we know the size of the upload */
- if(conn->data->set.infilesize < 0) {
+ if(conn->data->state.infilesize < 0) {
failf(conn->data, "Cannot APPEND with unknown input file size\n");
return CURLE_UPLOAD_FAILED;
}
@@ -787,7 +787,7 @@ static CURLcode imap_perform_append(struct connectdata *conn)
/* Send the APPEND command */
result = imap_sendf(conn, "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
- mailbox, conn->data->set.infilesize);
+ mailbox, conn->data->state.infilesize);
Curl_safefree(mailbox);
@@ -1618,7 +1618,7 @@ static CURLcode imap_state_append_resp(struct connectdata *conn, int imapcode,
}
else {
/* Set the progress upload size */
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
/* IMAP upload */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);