[evolution-data-server/gnome-3-30] I#63 - [CalDAV/CardDAV] Incorrectly thinks an object is created in offline
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-30] I#63 - [CalDAV/CardDAV] Incorrectly thinks an object is created in offline
- Date: Wed, 5 Dec 2018 10:19:29 +0000 (UTC)
commit e7ec76e52f475ec0fd1d80f5594ddf22aacb96be
Author: Milan Crha <mcrha redhat com>
Date: Wed Dec 5 11:18:06 2018 +0100
I#63 - [CalDAV/CardDAV] Incorrectly thinks an object is created in offline
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/63
src/addressbook/backends/carddav/e-book-backend-carddav.c | 6 +++---
src/calendar/backends/caldav/e-cal-backend-caldav.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/addressbook/backends/carddav/e-book-backend-carddav.c
b/src/addressbook/backends/carddav/e-book-backend-carddav.c
index d8db87031..33b734a4c 100644
--- a/src/addressbook/backends/carddav/e-book-backend-carddav.c
+++ b/src/addressbook/backends/carddav/e-book-backend-carddav.c
@@ -574,11 +574,11 @@ ebb_carddav_search_changes_cb (EBookCache *book_cache,
g_return_val_if_fail (ccd != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
- /* Can be NULL for added components in offline mode */
- if (extra && *extra) {
+ /* The 'extra' can be NULL for added contacts in offline mode */
+ if ((extra && *extra) || offline_state != E_OFFLINE_STATE_LOCALLY_CREATED) {
EBookMetaBackendInfo *nfo;
- nfo = g_hash_table_lookup (ccd->known_items, extra);
+ nfo = (extra && *extra) ? g_hash_table_lookup (ccd->known_items, extra) : NULL;
if (nfo) {
if (g_strcmp0 (revision, nfo->revision) == 0) {
g_hash_table_remove (ccd->known_items, extra);
diff --git a/src/calendar/backends/caldav/e-cal-backend-caldav.c
b/src/calendar/backends/caldav/e-cal-backend-caldav.c
index 18a2cd09a..00fb978c9 100644
--- a/src/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/src/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -623,11 +623,11 @@ ecb_caldav_search_changes_cb (ECalCache *cal_cache,
g_return_val_if_fail (ccd != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
- /* Can be NULL for added components in offline mode */
- if (extra && *extra && (!rid || !*rid)) {
+ /* The 'extra' can be NULL for added components in offline mode */
+ if (((extra && *extra) || offline_state != E_OFFLINE_STATE_LOCALLY_CREATED) && (!rid || !*rid)) {
ECalMetaBackendInfo *nfo;
- nfo = g_hash_table_lookup (ccd->known_items, extra);
+ nfo = (extra && *extra) ? g_hash_table_lookup (ccd->known_items, extra) : NULL;
if (nfo) {
if (g_strcmp0 (revision, nfo->revision) == 0) {
g_hash_table_remove (ccd->known_items, extra);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]