aboutsummaryrefslogtreecommitdiffstats
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
parent4412181b30b0e65b2d82f714162cc0ace4081785 (diff)
downloadgsoc2013-evolution-50cb220c0af1640bab5fde586f6c5f705de058ea.tar.gz
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
-rw-r--r--camel/ChangeLog12
-rw-r--r--camel/providers/imap/camel-imap-store.c13
-rw-r--r--camel/providers/imap4/camel-imap4-store.c5
-rw-r--r--camel/providers/pop3/camel-pop3-store.c5
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c5
5 files changed, 32 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 14e1786991..80ca2c8a69 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,17 @@
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.
+
+2004-11-01 Jeffrey Stedfast <fejj@novell.com>
+
* providers/imap4/camel-imap4-summary.c
(camel_imap4_summary_expunge): Remove expunged messages from the
cache.
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);
diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c
index 6d0bf79b64..e5dab71f68 100644
--- a/camel/providers/imap4/camel-imap4-store.c
+++ b/camel/providers/imap4/camel-imap4-store.c
@@ -351,7 +351,10 @@ connect_to_server_wrapper (CamelIMAP4Engine *engine, CamelException *ex)
if (ai == NULL)
return FALSE;
- ret = connect_to_server (engine, ai, mode, ex);
+ if (!(ret = connect_to_server (engine, ai, mode, ex)) && mode == MODE_SSL)
+ ret = connect_to_server (engine, ai, MODE_TLS, ex);
+ else if (!ret && mode == MODE_TLS)
+ ret = connect_to_server (engine, ai, MODE_CLEAR, ex);
camel_freeaddrinfo (ai);
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 75868910fa..3fcfef3fb7 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -319,7 +319,10 @@ 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);
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index e3d6ad3f34..ba89c440fe 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -427,7 +427,10 @@ 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);