aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smtp.c')
-rw-r--r--lib/smtp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index 1bd869eb0..3dc50bd6a 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -639,6 +639,7 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
struct SessionHandle *data = conn->data;
struct FTP *smtp = data->state.proto.smtp;
CURLcode result=CURLE_OK;
+ ssize_t bytes_written;
(void)premature;
if(!smtp)
@@ -653,6 +654,15 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
conn->bits.close = TRUE; /* marked for closure */
result = status; /* use the already set error code */
}
+ else
+ /* TODO: make this work even when the socket is EWOULDBLOCK in this call! */
+
+ /* write to socket (send away data) */
+ result = Curl_write(conn,
+ conn->writesockfd, /* socket to send to */
+ SMTP_EOB, /* buffer pointer */
+ SMTP_EOB_LEN, /* buffer size */
+ &bytes_written); /* actually sent away */
/* clear these for next connection */
smtp->transfer = FTPTRANSFER_BODY;