aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-02-23 16:27:17 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-02-23 16:27:17 +0000
commit0ee79114ef6f3a8ea3bb4b1cc0a502b3164b76ad (patch)
treec12f595266b24e1a86a6979622eed87576aed363 /lib
parent29a4a16db8dbf060ef193ff9d673d69449ec079f (diff)
pop3: Removed some FTP heritage leftovers
Removed user and passwd from the POP3 struct as these cannot be set on a per-request basis and are leftover from legacy FTP code. Changed some comments still using FTP terminology.
Diffstat (limited to 'lib')
-rw-r--r--lib/pop3.c15
-rw-r--r--lib/pop3.h2
2 files changed, 3 insertions, 14 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 182ca623c..43171f768 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -434,7 +434,6 @@ static CURLcode pop3_state_upgrade_tls(struct connectdata *conn)
static CURLcode pop3_state_user(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- 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 */
@@ -446,7 +445,7 @@ static CURLcode pop3_state_user(struct connectdata *conn)
/* Send the USER command */
result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s",
- pop3->user ? pop3->user : "");
+ conn->user ? conn->user : "");
if(result)
return result;
@@ -1011,7 +1010,6 @@ static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code,
{
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data;
- struct POP3 *pop3 = data->state.proto.pop3;
(void)instate; /* no use for this yet */
@@ -1022,7 +1020,7 @@ static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code,
else
/* Send the PASS command */
result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
- pop3->passwd ? pop3->passwd : "");
+ conn->passwd ? conn->passwd : "");
if(result)
return result;
@@ -1301,13 +1299,6 @@ static CURLcode pop3_init(struct connectdata *conn)
/* Get some initial data into the pop3 struct */
pop3->bytecountp = &data->req.bytecount;
- /* No need to duplicate user+password, the connectdata struct won't change
- during a session, but we re-init them here since on subsequent inits
- since the conn struct may have changed or been replaced.
- */
- pop3->user = conn->user;
- pop3->passwd = conn->passwd;
-
return CURLE_OK;
}
@@ -1411,7 +1402,7 @@ static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
*
* pop3_perform()
*
- * This is the actual DO function for POP3. Get a file/directory according to
+ * This is the actual DO function for POP3. Get a message/listing according to
* the options previously setup.
*/
static CURLcode pop3_perform(struct connectdata *conn, bool *connected,
diff --git a/lib/pop3.h b/lib/pop3.h
index c16ad395c..cfad93c84 100644
--- a/lib/pop3.h
+++ b/lib/pop3.h
@@ -58,8 +58,6 @@ typedef enum {
used. */
struct POP3 {
curl_off_t *bytecountp;
- char *user; /* User name string */
- char *passwd; /* Password string */
curl_ftptransfer transfer;
char *mailbox; /* Message ID */
char *custom; /* Custom Request */