aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smtp.c')
-rw-r--r--lib/smtp.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index b01ad7d5c..cfd4d981c 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -135,7 +135,8 @@ const struct Curl_handler Curl_handler_smtp = {
ZERO_NULL, /* perform_getsock */
smtp_disconnect, /* disconnect */
PORT_SMTP, /* defport */
- PROT_SMTP /* protocol */
+ PROT_SMTP, /* protocol */
+ PROTOPT_CLOSEACTION /* flags */
};
@@ -158,7 +159,8 @@ const struct Curl_handler Curl_handler_smtps = {
ZERO_NULL, /* perform_getsock */
smtp_disconnect, /* disconnect */
PORT_SMTPS, /* defport */
- PROT_SMTP | PROT_SMTPS | PROT_SSL /* protocol */
+ PROT_SMTP | PROT_SMTPS, /* protocol */
+ PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */
};
#endif
@@ -181,7 +183,8 @@ static const struct Curl_handler Curl_handler_smtp_proxy = {
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_SMTP, /* defport */
- PROT_HTTP /* protocol */
+ PROT_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
@@ -204,7 +207,8 @@ static const struct Curl_handler Curl_handler_smtps_proxy = {
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_SMTPS, /* defport */
- PROT_HTTP /* protocol */
+ PROT_HTTP, /* protocol */
+ PROTOPT_NONE /* flags */
};
#endif
#endif
@@ -471,7 +475,7 @@ static CURLcode smtp_state_starttls_resp(struct connectdata *conn,
/* Curl_ssl_connect is BLOCKING */
result = Curl_ssl_connect(conn, FIRSTSOCKET);
if(CURLE_OK == result) {
- conn->protocol |= PROT_SMTPS;
+ conn->handler = &Curl_handler_smtps;
result = smtp_state_ehlo(conn);
}
}
@@ -1101,7 +1105,7 @@ static CURLcode smtp_connect(struct connectdata *conn,
}
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
- if(conn->protocol & PROT_SMTPS) {
+ if(conn->handler->protocol & PROT_SMTPS) {
/* BLOCKING */
/* SMTPS is simply smtp with SSL for the control channel */
/* now, perform the SSL initialization for this socket */