aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-12 01:01:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-12 01:01:15 +0800
commitdd30dd5376eb85d2f3875d7192cd05e4575bcb27 (patch)
treed89ccfb24ea2614d21a7fcf44abaeaebfbe8a492 /camel/providers/smtp
parente5d67f7e4229c49f96ca8dfea7cf7e6b09423b90 (diff)
downloadgsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.tar
gsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.tar.gz
gsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.tar.bz2
gsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.tar.lz
gsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.tar.xz
gsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.tar.zst
gsoc2013-evolution-dd30dd5376eb85d2f3875d7192cd05e4575bcb27.zip
These fixes should fix bug #21737.
2002-03-11 Jeffrey Stedfast <fejj@ximian.com> These fixes should fix bug #21737. * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Same as with the POP code. * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): Slight restructuring of the if-statements for the USE_SSL_ALWAYS case so that we can't possibly return TRUE unless we really did connect successfully. svn path=/trunk/; revision=16097
Diffstat (limited to 'camel/providers/smtp')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index d45c617c02..0c331bb673 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -402,12 +402,14 @@ connect_to_server_wrapper (CamelService *service, CamelException *ex)
if (transport->flags & CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS) {
/* First try STARTTLS */
- if (!connect_to_server (service, TRUE, ex) &&
- !(transport->flags & CAMEL_SMTP_TRANSPORT_STARTTLS) &&
- EXCEPTION_RETRY (ex)) {
- /* STARTTLS is unavailable - okay, now try port 465 */
- camel_exception_clear (ex);
- return connect_to_server (service, FALSE, ex);
+ 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 */
+ camel_exception_clear (ex);
+ return connect_to_server (service, FALSE, ex);
+ } else {
+ return FALSE;
+ }
}
return TRUE;