[evolution-data-server] [IMAPX] Do not overwrite errors on reconnect
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [IMAPX] Do not overwrite errors on reconnect
- Date: Mon, 22 Aug 2011 11:52:01 +0000 (UTC)
commit f8a01b8838addd69951414d42d9794431d53957c
Author: Milan Crha <mcrha redhat com>
Date: Mon Aug 22 13:51:28 2011 +0200
[IMAPX] Do not overwrite errors on reconnect
camel/providers/imapx/camel-imapx-server.c | 33 +++++++++++++++------------
1 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index eef2833..35a7f15 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3126,23 +3126,25 @@ imapx_reconnect (CamelIMAPXServer *is,
if (!authtype && url->authmech) {
if (!g_hash_table_lookup (is->cinfo->auth_types, url->authmech)) {
- g_set_error (
- error, CAMEL_SERVICE_ERROR,
- CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
- _("IMAP server %s does not support requested "
- "authentication type %s"),
- url->host, url->authmech);
+ if (error && !*error)
+ g_set_error (
+ error, CAMEL_SERVICE_ERROR,
+ CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
+ _("IMAP server %s does not support requested "
+ "authentication type %s"),
+ url->host, url->authmech);
goto exception;
}
authtype = camel_sasl_authtype (url->authmech);
if (!authtype) {
noauth:
- g_set_error (
- error, CAMEL_SERVICE_ERROR,
- CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
- _("No support for authentication type %s"),
- url->authmech);
+ if (error && !*error)
+ g_set_error (
+ error, CAMEL_SERVICE_ERROR,
+ CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
+ _("No support for authentication type %s"),
+ url->authmech);
goto exception;
}
}
@@ -3182,10 +3184,11 @@ imapx_reconnect (CamelIMAPXServer *is,
errbuf = NULL;
if (!url->passwd) {
- g_set_error (
- error, G_IO_ERROR,
- G_IO_ERROR_CANCELLED,
- _("You did not enter a password."));
+ if (error && !*error)
+ g_set_error (
+ error, G_IO_ERROR,
+ G_IO_ERROR_CANCELLED,
+ _("You did not enter a password."));
if (sasl)
g_object_unref (sasl);
goto exception;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]