[evolution-data-server] [IMAPx] 'STARTTLS not supported' error ignored
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [IMAPx] 'STARTTLS not supported' error ignored
- Date: Tue, 10 May 2016 19:48:36 +0000 (UTC)
commit f26a6f672096790d0bbd76903db4c9a2e44f116b
Author: Milan Crha <mcrha redhat com>
Date: Tue May 10 21:44:11 2016 +0200
[IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failure properly reported.
This had been filled at:
https://bugzilla.redhat.com/show_bug.cgi?id=1334842
camel/providers/imapx/camel-imapx-server.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 60ebf08..0aa108a 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2680,7 +2680,6 @@ imapx_connect_to_server (CamelIMAPXServer *is,
gboolean use_shell_command;
gboolean success = TRUE;
gchar *host;
- GError *local_error = NULL;
store = camel_imapx_server_ref_store (is);
@@ -2716,6 +2715,7 @@ imapx_connect_to_server (CamelIMAPXServer *is,
if (connection != NULL) {
GInputStream *input_stream;
GOutputStream *output_stream;
+ GError *local_error = NULL;
/* Disable the Nagle algorithm with TCP_NODELAY, since IMAP
* commands should be issued immediately even we've not yet
@@ -2812,10 +2812,11 @@ connected:
if (CAMEL_IMAPX_LACK_CAPABILITY (is->priv->cinfo, STARTTLS)) {
g_mutex_unlock (&is->priv->stream_lock);
g_set_error (
- &local_error, CAMEL_ERROR,
+ error, CAMEL_ERROR,
CAMEL_ERROR_GENERIC,
_("Failed to connect to IMAP server %s in secure mode: %s"),
host, _("STARTTLS not supported"));
+ success = FALSE;
goto exit;
} else {
g_mutex_unlock (&is->priv->stream_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]