aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2012-06-09 19:22:29 +0100
committerSteve Holme <steve_holme@hotmail.com>2012-06-09 19:22:29 +0100
commit6188855b67236412724895244322b5b59a6efaaa (patch)
treea5558c44bf05139a54ef47078a20c667bea49aeb
parenta3660127a4497b2e30988c5f6aad3d17343ed6e0 (diff)
smtp: Post apop feature code tidy up
-rw-r--r--lib/smtp.c6
-rw-r--r--lib/smtp.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index 137f93538..b10b260d0 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1549,11 +1549,13 @@ static CURLcode smtp_disconnect(struct connectdata *conn,
if(!dead_connection && smtpc->pp.conn)
(void)smtp_quit(conn); /* ignore errors on the LOGOUT */
+ /* Disconnect from the server */
Curl_pp_disconnect(&smtpc->pp);
+ /* Cleanup the SASL module */
Curl_sasl_cleanup(conn, smtpc->authused);
- /* This won't already be freed in some error cases */
+ /* Cleanup our connection based variables */
Curl_safefree(smtpc->domain);
return CURLE_OK;
@@ -1570,8 +1572,6 @@ static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected)
/* no data to transfer */
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
- Curl_safefree(smtpc->domain);
-
return CURLE_OK;
}
diff --git a/lib/smtp.h b/lib/smtp.h
index 5235e2b2b..38fd1b70a 100644
--- a/lib/smtp.h
+++ b/lib/smtp.h
@@ -61,7 +61,7 @@ struct smtp_conn {
size_t eob; /* Number of bytes of the EOB (End Of Body) that
have been received so far */
unsigned int authmechs; /* Accepted authentication mechanisms */
- unsigned int authused; /* Authentication method used for the connection */
+ unsigned int authused; /* Auth mechanism used for the connection */
smtpstate state; /* Always use smtp.c:state() to change state! */
struct curl_slist *rcpt; /* Recipient list */
bool ssldone; /* Is connect() over SSL done? only relevant in