aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-19 05:59:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-19 05:59:54 +0800
commit17ef9cfeafbef81a54b19a90631d65e038f72829 (patch)
tree8bb856a7f0d39281a5399afd43e6b710b79cf5a8 /camel
parentae8129bbb2d1607c0776ec3e6bbe0a7791fec33f (diff)
downloadgsoc2013-evolution-17ef9cfeafbef81a54b19a90631d65e038f72829.tar.gz
gsoc2013-evolution-17ef9cfeafbef81a54b19a90631d65e038f72829.tar.zst
gsoc2013-evolution-17ef9cfeafbef81a54b19a90631d65e038f72829.zip
Updated to use the same logic as the POP code.
2002-03-18 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Updated to use the same logic as the POP code. svn path=/trunk/; revision=16203
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index d6af52d537..4de990397c 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,9 @@
2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/smtp/camel-smtp-transport.c
+ (connect_to_server_wrapper): Updated to use the same logic as the
+ POP code.
+
* providers/pop3/camel-pop3-store.c (connect_to_server): No longer
takes a stls_supported argument since we no longer need it with
the new logic.
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index d0b257cd6b..7807e87593 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -391,9 +391,6 @@ connect_to_server (CamelService *service, int try_starttls, CamelException *ex)
#endif /* HAVE_SSL */
}
-#define EXCEPTION_RETRY(ex) (camel_exception_get_id (ex) != CAMEL_EXCEPTION_USER_CANCEL && \
- camel_exception_get_id (ex) != CAMEL_EXCEPTION_SERVICE_UNAVAILABLE)
-
static gboolean
connect_to_server_wrapper (CamelService *service, CamelException *ex)
{
@@ -401,12 +398,12 @@ connect_to_server_wrapper (CamelService *service, CamelException *ex)
CamelSmtpTransport *transport = (CamelSmtpTransport *) service;
if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS) {
- /* First try STARTTLS */
- if (!connect_to_server (service, TRUE, ex)) {
- if (!(transport->flags & CAMEL_SMTP_TRANSPORT_STARTTLS) && EXCEPTION_RETRY (ex)) {
- /* STARTTLS is unavailable - okay, now try port 465 */
+ /* First try connecting to the SSL port */
+ if (!connect_to_server (service, FALSE, ex)) {
+ if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_UNAVAILABLE) {
+ /* Seems the SSL port is unavailable, lets try STARTTLS */
camel_exception_clear (ex);
- return connect_to_server (service, FALSE, ex);
+ return connect_to_server (service, TRUE, ex);
} else {
return FALSE;
}