[evolution-ews] Don't flush the final GAL updates if there are none
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [evolution-ews] Don't flush the final GAL updates if there are none
- Date: Wed, 17 Sep 2014 20:23:25 +0000 (UTC)
commit 76e21be0d0de7aa696b99749b41bbf75dc276581
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
 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 fc14b98..635b757 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -2591,8 +2591,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]