[evolution-ews/evolution-ews-3-12] Don't flush the final GAL updates if there are none



commit 7d88f5d23d04dd87d94fc2f544190630d2b179f6
Author: David Woodhouse <David Woodhouse intel com>
Date:   Wed Sep 17 21:21:39 2014 +0100

    Don't flush the final GAL updates if there are none
    
    (cherry picked from commit 76e21be0d0de7aa696b99749b41bbf75dc276581)

 src/addressbook/e-book-backend-ews.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index b4b70e0..af24569 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -2568,8 +2568,9 @@ ews_replace_gal_in_db (EBookBackendEws *cbews,
        data.cancellable = cancellable;
 
        ret = ews_oab_decoder_decode (eod, ews_gal_filter_contact, ews_gal_store_contact, &data, cancellable, 
error);
-       /* Flush final entries */
-       ews_gal_store_contact (NULL, 0, NULL, 100, &data, error);
+       /* Flush final entries if there are any */
+       if (data.contact_collector)
+               ews_gal_store_contact (NULL, 0, NULL, 100, &data, error);
 
        /* Remove any items which were not present in the new OAB */
        g_hash_table_foreach (data.uids, append_to_list, &stale_uids);


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