[evolution-mapi] Bug #693181 - Does not ask for password after its change



commit a057651cd9d60eab1c78c8161e8feafd5181af03
Author: Milan Crha <mcrha redhat com>
Date:   Tue Feb 5 17:45:40 2013 +0100

    Bug #693181 - Does not ask for password after its change

 src/addressbook/e-book-backend-mapi.c          |    3 +--
 src/calendar/e-cal-backend-mapi.c              |    3 +--
 src/camel/camel-mapi-store.c                   |   10 ++--------
 src/configuration/e-mail-config-mapi-backend.c |    2 +-
 4 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
index 45a8d5f..f04a17e 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -392,8 +392,7 @@ ebbm_connect_user (EBookBackendMAPI *ebma,
 			g_object_unref (old_conn);
 
 		if (!priv->conn || mapi_error) {
-			gboolean is_network_error = g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_NETWORK_ERROR) ||
-				(mapi_error && mapi_error->domain != E_MAPI_ERROR);
+			gboolean is_network_error = mapi_error && mapi_error->domain != E_MAPI_ERROR;
 
 			if (priv->conn) {
 				g_object_unref (priv->conn);
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index 04af1f3..5f35b1a 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -1203,8 +1203,7 @@ ecbm_connect_user (ECalBackend *backend,
 			g_signal_connect (priv->conn, "server-notification", G_CALLBACK (ecbm_server_notification_cb), cbmapi);
 		}
 	} else {
-		gboolean is_network_error = g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_NETWORK_ERROR) ||
-			(mapi_error && mapi_error->domain != E_MAPI_ERROR);
+		gboolean is_network_error = mapi_error && mapi_error->domain != E_MAPI_ERROR;
 
 		if (is_network_error)
 			mapi_error_to_edc_error (perror, mapi_error, OtherError, NULL);
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index f0e2634..396afc0 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -2685,16 +2685,10 @@ mapi_authenticate_sync (CamelService *service,
 
 		if (camel_mapi_settings_get_listen_notifications (mapi_settings))
 			e_mapi_connection_enable_notifications (store->priv->connection, NULL, 0, NULL, NULL);
-	} else if (g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_LOGON_FAILED)) {
+	} else if (g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_LOGON_FAILED) ||
+		   g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_NETWORK_ERROR)) {
 		g_clear_error (&mapi_error);
 		result = CAMEL_AUTHENTICATION_REJECTED;
-	} else if (g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_NETWORK_ERROR)) {
-		g_set_error_literal (
-			error, CAMEL_SERVICE_ERROR,
-			CAMEL_SERVICE_ERROR_UNAVAILABLE,
-			mapi_error->message);
-		g_clear_error (&mapi_error);
-		result = CAMEL_AUTHENTICATION_ERROR;
 	} else {
 		/* mapi_error should be set */
 		g_return_val_if_fail (
diff --git a/src/configuration/e-mail-config-mapi-backend.c b/src/configuration/e-mail-config-mapi-backend.c
index cc2f1d1..8fa0388 100644
--- a/src/configuration/e-mail-config-mapi-backend.c
+++ b/src/configuration/e-mail-config-mapi-backend.c
@@ -319,7 +319,7 @@ mail_config_mapi_authenticator_try_password_sync (ESourceAuthenticator *auth,
 		&mapi_error);
 
 	if (mapi_error) {
-		gboolean is_network_error = g_error_matches (mapi_error, E_MAPI_ERROR, MAPI_E_NETWORK_ERROR);
+		gboolean is_network_error = mapi_error && mapi_error->domain != E_MAPI_ERROR;
 
 		g_warn_if_fail (!mapi_authenticator->success);
 		mapi_authenticator->success = FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]