[evolution-data-server] [WebDAV book backend] Return at least offline contacts when not connected
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [WebDAV book backend] Return at least offline contacts when not connected
- Date: Thu, 5 Feb 2015 13:59:53 +0000 (UTC)
commit 94ead8415b46af815d00099573dcbf85524296ea
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 5 14:53:33 2015 +0100
[WebDAV book backend] Return at least offline contacts when not connected
The EBackend::online state doesn't necessarily mean that the book is
also connected, thus the book_backend_webdav_get_contact_list_sync()
could fail with 'Authentication required' when it was tried to
download contacts in the state without credentials.
.../backends/webdav/e-book-backend-webdav.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c
b/addressbook/backends/webdav/e-book-backend-webdav.c
index 5f130a5..c9fce94 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -1789,7 +1789,8 @@ book_backend_webdav_get_contact_list_sync (EBookBackend *backend,
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
GList *contact_list;
- if (e_backend_get_online (E_BACKEND (backend))) {
+ if (e_backend_get_online (E_BACKEND (backend)) &&
+ e_source_get_connection_status (e_backend_get_source (E_BACKEND (backend))) ==
E_SOURCE_CONNECTION_STATUS_CONNECTED) {
/* make sure the cache is up to date */
if (!download_contacts (webdav, NULL, NULL, cancellable, error))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]