Commit e7ec76e5 authored by Milan Crha's avatar Milan Crha

I#63 - [CalDAV/CardDAV] Incorrectly thinks an object is created in offline

Closes GNOME/evolution-data-server#63
parent c610770c
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment