static CURLcode pop3_state_user(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- struct FTP *pop3 = conn->data->state.proto.pop3;
+ struct POP3 *pop3 = conn->data->state.proto.pop3;
/* Check we have a username and password to authenticate with and end the
connect phase if we don't */
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
+ struct POP3 *pop3 = data->state.proto.pop3;
(void)instate; /* no use for this yet */
if(pop3c->mailbox[0] != '\0') {
/* Message specific LIST so skip the BODY transfer */
- struct FTP *pop3 = conn->data->state.proto.pop3;
+ struct POP3 *pop3 = conn->data->state.proto.pop3;
pop3->transfer = FTPTRANSFER_INFO;
}
}
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
+ struct POP3 *pop3 = data->state.proto.pop3;
struct pop3_conn *pop3c = &conn->proto.pop3c;
struct pingpong *pp = &pop3c->pp;
static CURLcode pop3_init(struct connectdata *conn)
{
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
+ struct POP3 *pop3 = data->state.proto.pop3;
if(!pop3) {
- pop3 = data->state.proto.pop3 = calloc(sizeof(struct FTP), 1);
+ pop3 = data->state.proto.pop3 = calloc(sizeof(struct POP3), 1);
if(!pop3)
return CURLE_OUT_OF_MEMORY;
}
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct FTP *pop3 = data->state.proto.pop3;
+ struct POP3 *pop3 = data->state.proto.pop3;
struct pop3_conn *pop3c = &conn->proto.pop3c;
(void)premature;
if(conn->data->set.opt_no_body) {
/* Requested no body means no transfer */
- struct FTP *pop3 = conn->data->state.proto.pop3;
+ struct POP3 *pop3 = conn->data->state.proto.pop3;
pop3->transfer = FTPTRANSFER_INFO;
}
/* Call this when the DO phase has completed */
static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected)
{
- struct FTP *pop3 = conn->data->state.proto.pop3;
+ struct POP3 *pop3 = conn->data->state.proto.pop3;
(void)connected;
*
***************************************************************************/
+#include "pingpong.h"
+
/****************************************************************************
* POP3 unique setup
***************************************************************************/
POP3_LAST /* never used */
} pop3state;
+/* This POP3 struct is used in the SessionHandle. All POP3 data that is
+ connection-oriented must be in pop3_conn to properly deal with the fact that
+ perhaps the SessionHandle is changed between the times the connection is
+ used. */
+struct POP3 {
+ curl_off_t *bytecountp;
+ char *user; /* User name string */
+ char *passwd; /* Password string */
+ curl_ftptransfer transfer;
+};
+
/* pop3_conn is used for struct connection-oriented data in the connectdata
struct */
struct pop3_conn {