[evolution] Ignore errors when searching for email address in books



commit f39a994a34477206bc4ba759634a30b8144e5eb1
Author: Milan Crha <mcrha redhat com>
Date:   Thu Feb 5 15:12:42 2015 +0100

    Ignore errors when searching for email address in books
    
    There is no need to stop searching for an email address in available
    books when one book fails with an error after it was successfully
    opened.

 mail/e-mail-ui-session.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index accecfc..ac36bc2 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -1220,13 +1220,16 @@ e_mail_ui_session_check_known_address_sync (EMailUISession *session,
 
                success = e_book_client_get_contacts_uids_sync (
                        E_BOOK_CLIENT (client), book_query_string,
-                       &uids, cancellable, error);
+                       &uids, cancellable, &local_error);
 
                g_object_unref (client);
 
                if (!success) {
                        g_warn_if_fail (uids == NULL);
-                       break;
+
+                       /* ignore book-specific errors here and continue with the next */
+                       g_clear_error (&local_error);
+                       continue;
                }
 
                if (uids != NULL) {


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