[evolution-exchange] Bug #624146 - Runtime warnings while connecting
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange] Bug #624146 - Runtime warnings while connecting
- Date: Mon, 6 Sep 2010 08:13:58 +0000 (UTC)
commit 9fc2e5dc62cad05a7f72142813664242bcccc474
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 6 10:12:57 2010 +0200
Bug #624146 - Runtime warnings while connecting
camel/camel-exchange-store.c | 6 +++++-
camel/camel-exchange-utils.c | 6 ++++++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-exchange-store.c b/camel/camel-exchange-store.c
index ea7d8dd..d1abdb0 100644
--- a/camel/camel-exchange-store.c
+++ b/camel/camel-exchange-store.c
@@ -354,13 +354,16 @@ exchange_store_connect (CamelService *service,
/* Initialize the stub connection */
if (!camel_exchange_utils_connect (service, password, &connect_status, &local_error)) {
+ g_clear_error (error);
+
/* The user cancelled the connection attempt. */
if (local_error == NULL)
g_set_error (
error, G_IO_ERROR,
G_IO_ERROR_CANCELLED,
"Cancelled");
- g_propagate_error (error, local_error);
+ else
+ g_propagate_error (error, local_error);
g_mutex_unlock (exch->connect_lock);
return FALSE;
}
@@ -373,6 +376,7 @@ exchange_store_connect (CamelService *service,
service->url->passwd = NULL;
}
+ g_clear_error (error);
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Could not authenticate to server. "
diff --git a/camel/camel-exchange-utils.c b/camel/camel-exchange-utils.c
index 5fb93f4..cd07333 100644
--- a/camel/camel-exchange-utils.c
+++ b/camel/camel-exchange-utils.c
@@ -2118,6 +2118,12 @@ camel_exchange_utils_connect (CamelService *service,
const gchar *uri;
struct update_linestatus ul;
+ if (ed == NULL) {
+ g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ "Could not find Exchange account. Make sure you've only one Exchange account configured.");
+ return FALSE;
+ }
+
g_return_val_if_fail (ed != NULL, FALSE);
g_return_val_if_fail (status != NULL, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]