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



commit 99c0fc086e3dbe77568ce9ec17984391fc637abb
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

 src/plugins/bbdb/bbdb.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/bbdb/bbdb.c b/src/plugins/bbdb/bbdb.c
index a843183..62d0e42 100644
--- a/src/plugins/bbdb/bbdb.c
+++ b/src/plugins/bbdb/bbdb.c
@@ -377,11 +377,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;
                }
 
@@ -407,12 +413,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]