aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.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/smtp.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/smtp.c')
-rw-r--r--lib/smtp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index d367d94b8..762a8d16a 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -583,8 +583,8 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
}
/* Calculate the optional SIZE parameter */
- if(conn->proto.smtpc.size_supported && conn->data->set.infilesize > 0) {
- size = aprintf("%" CURL_FORMAT_CURL_OFF_T, data->set.infilesize);
+ if(conn->proto.smtpc.size_supported && conn->data->state.infilesize > 0) {
+ size = aprintf("%" CURL_FORMAT_CURL_OFF_T, data->state.infilesize);
if(!size) {
Curl_safefree(from);
@@ -1356,7 +1356,7 @@ static CURLcode smtp_state_data_resp(struct connectdata *conn, int smtpcode,
}
else {
/* Set the progress upload size */
- Curl_pgrsSetUploadSize(data, data->set.infilesize);
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
/* SMTP upload */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
@@ -1659,7 +1659,7 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
is "no mail data". RFC-5321, sect. 4.1.1.4. */
eob = SMTP_EOB;
len = SMTP_EOB_LEN;
- if(smtp->trailing_crlf || !conn->data->set.infilesize) {
+ if(smtp->trailing_crlf || !conn->data->state.infilesize) {
eob += 2;
len -= 2;
}