[evolution-data-server] Fix google contacts going online after being offline



commit 2f15ad566642e2067bb3027309d94884bcb6c073
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Feb 7 12:26:52 2012 +0100

    Fix google contacts going online after being offline
    
    The google contacts backend has another error similar to bug 658911,
    if it goes offline and then goes online it does request_auth(), but in
    the case of existing GOA authentication that will never recieve the
    authentication callback, so we never go !readonly.
    
    This patch fixes that, and also fixes an issue in the fix in
    bug 658911, where if its offline at startup it should not claim to be
    !readonly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669557

 .../backends/google/e-book-backend-google.c        |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index 5f57468..4626e90 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -2201,7 +2201,8 @@ e_book_backend_google_open (EBookBackend *backend,
 	}
 
 	if (!is_online || backend_is_authorized (backend)) {
-		e_book_backend_notify_readonly (backend, FALSE);
+		if (is_online)
+			e_book_backend_notify_readonly (backend, FALSE);
 		e_book_backend_notify_opened (backend, NULL /* Success */);
 	}
 
@@ -2404,6 +2405,8 @@ e_book_backend_google_notify_online_cb (EBookBackend *backend,
 
 	if (is_online && e_book_backend_is_opened (backend)) {
 		request_authorization (backend);
+		if (backend_is_authorized (backend))
+			e_book_backend_notify_readonly (backend, FALSE);
 	} else {
 		/* Going offline, so cancel all running operations */
 		google_cancel_all_operations (backend);



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