smtpstate instate)
{
struct SessionHandle *data = conn->data;
- struct FTP *smtp = data->state.proto.smtp;
+ struct SMTP *smtp = data->state.proto.smtp;
(void)instate; /* no use for this yet */
static CURLcode smtp_init(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
- struct FTP *smtp = data->state.proto.smtp;
+ struct SMTP *smtp = data->state.proto.smtp;
if(!smtp) {
- smtp = data->state.proto.smtp = calloc(sizeof(struct FTP), 1);
+ smtp = data->state.proto.smtp = calloc(sizeof(struct SMTP), 1);
if(!smtp)
return CURLE_OUT_OF_MEMORY;
}
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *smtp = data->state.proto.smtp;
+ struct SMTP *smtp = data->state.proto.smtp;
ssize_t bytes_written;
(void)premature;
if(conn->data->set.opt_no_body) {
/* Requested no body means no transfer */
- struct FTP *smtp = conn->data->state.proto.smtp;
+ struct SMTP *smtp = conn->data->state.proto.smtp;
smtp->transfer = FTPTRANSFER_INFO;
}
/* Call this when the DO phase has completed */
static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected)
{
- struct FTP *smtp = conn->data->state.proto.smtp;
+ struct SMTP *smtp = conn->data->state.proto.smtp;
(void)connected;
SMTP_LAST /* never used */
} smtpstate;
+/* This SMTP struct is used in the SessionHandle. All SMTP data that is
+ connection-oriented must be in smtp_conn to properly deal with the fact that
+ perhaps the SessionHandle is changed between the times the connection is
+ used. */
+struct SMTP {
+ curl_off_t *bytecountp;
+ char *user; /* User name string */
+ char *passwd; /* Password string */
+ curl_pp_transfer transfer;
+};
+
/* smtp_conn is used for struct connection-oriented data in the connectdata
struct */
struct smtp_conn {