aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-11-02 04:54:35 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-11-02 04:54:35 +0800
commit50cb220c0af1640bab5fde586f6c5f705de058ea (patch)
tree2135f964df834cca838e44dae456831995b1ab4a /camel/providers/imap
parent4412181b30b0e65b2d82f714162cc0ace4081785 (diff)
downloadgsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar
gsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar.gz
gsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar.bz2
gsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar.lz
gsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar.xz
gsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar.zst
gsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.zip
Do the same SSL->TLS and TLS->CLEAR fallbacks that the 2.0 (and older)
2004-11-01 Jeffrey Stedfast <fejj@novell.com> * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Do the same SSL->TLS and TLS->CLEAR fallbacks that the 2.0 (and older) code did. * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): Same. * providers/imap4/camel-imap4-store.c (connect_to_server_wrapper): Same. * providers/imap/camel-imap-store.c (connect_to_server_wrapper): Same. svn path=/trunk/; revision=27786
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-store.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index afe9ed8c4b..b22743e72a 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -872,9 +872,9 @@ static struct {
} ssl_options[] = {
{ "", "imaps", IMAPS_PORT, MODE_SSL }, /* really old (1.x) */
{ "always", "imaps", IMAPS_PORT, MODE_SSL },
- { "when-possible", "imap", IMAP_PORT, MODE_TLS },
- { "never", "imap", IMAP_PORT, MODE_CLEAR },
- { NULL, "imap", IMAP_PORT, MODE_CLEAR },
+ { "when-possible", "imap", IMAP_PORT, MODE_TLS },
+ { "never", "imap", IMAP_PORT, MODE_CLEAR },
+ { NULL, "imap", IMAP_PORT, MODE_CLEAR },
};
static gboolean
@@ -918,8 +918,11 @@ connect_to_server_wrapper (CamelService *service, CamelException *ex)
}
if (ai == NULL)
return FALSE;
-
- ret = connect_to_server (service, ai, mode, ex);
+
+ if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL)
+ ret = connect_to_server (service, ai, MODE_TLS, ex);
+ else if (!ret && mode == MODE_TLS)
+ ret = connect_to_server (service, ai, MODE_CLEAR, ex);
camel_freeaddrinfo (ai);