diff options
author | Milan Crha <mcrha@redhat.com> | 2015-02-05 14:53:33 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2015-02-05 14:53:33 +0100 |
commit | 94ead8415b46af815d00099573dcbf85524296ea (patch) | |
tree | bca6719f2994133aaaeaaab178ef8f51af2fbb79 /addressbook | |
parent | 7f373b1b212f243e8af27955490f256ade29129c (diff) | |
download | evolution-data-server-94ead8415b46af815d00099573dcbf85524296ea.tar.gz |
[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.
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/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 5f130a5d7..c9fce94cc 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; |