[evolution/gnome-3-22] Bug 778036 - [bbdb] Auto Contacts give up after EWS GAL lookup failure



commit 4cadc6e6fe6e4214fe17ca155352192d62be9443
Author: Milan Crha <mcrha redhat com>
Date:   Mon Feb 6 12:05:14 2017 +0100

    Bug 778036 - [bbdb] Auto Contacts give up after EWS GAL lookup failure

 plugins/bbdb/bbdb.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index 5c912be..e0f7dbf 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -379,11 +379,17 @@ bbdb_do_it (EBookClient *client,
                status = e_book_client_get_contacts_sync (client_addressbook, query_string, &contacts, NULL, 
NULL);
                g_free (query_string);
                if (contacts != NULL || !status) {
-                       g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
-                       g_free (temp_name);
-                       g_list_free_full (addressbooks, (GDestroyNotify) g_object_unref);
+                       g_slist_free_full (contacts, g_object_unref);
                        g_object_unref (client_addressbook);
 
+                       if (!status) {
+                               aux_addressbooks = aux_addressbooks->next;
+                               continue;
+                       }
+
+                       g_free (temp_name);
+                       g_list_free_full (addressbooks, g_object_unref);
+
                        return;
                }
 
@@ -409,12 +415,16 @@ bbdb_do_it (EBookClient *client,
                         * name, just give up; we're not smart enough for
                         * this. */
                        if (!status || contacts->next != NULL) {
-                               g_slist_free_full (
-                                               contacts,
-                                               (GDestroyNotify) g_object_unref);
-                               g_free (temp_name);
-                               g_list_free_full (addressbooks, (GDestroyNotify) g_object_unref);
+                               g_slist_free_full (contacts, g_object_unref);
                                g_object_unref (client_addressbook);
+
+                               if (!status) {
+                                       aux_addressbooks = aux_addressbooks->next;
+                                       continue;
+                               }
+
+                               g_free (temp_name);
+                               g_list_free_full (addressbooks, g_object_unref);
                                return;
                        }
 


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