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



commit 494b856eea59dbd8dcb98dc030551dcc305aa89a
Author: Milan Crha <mcrha redhat com>
Date:   Tue Feb 5 17:46:14 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 7302c8d..8f5fc28 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -398,8 +398,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 6c51694..d211b12 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -1259,8 +1259,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 4678f75..ce8d39b 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -2673,16 +2673,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 5d6839a..00eff12 100644
--- a/src/configuration/e-mail-config-mapi-backend.c
+++ b/src/configuration/e-mail-config-mapi-backend.c
@@ -320,7 +320,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]