From 199a68f6a975be934991fd1f868dc9b1a78a4e09 Mon Sep 17 00:00:00 2001 From: Adenilson Cavalcanti Date: Wed, 5 Nov 2008 19:50:29 -0400 Subject: [PATCH] Using only opensync sink property to determine if its a slow sync or a fast sync that needs to be done. I discovered that the anchor being returned is NULL, so this is why I'm getting updated contacts (when receiving a NULL timestamp, libgcal asks for updated contacts starting from 6:00:00Z of current day). --- src/gcalendar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gcalendar.c b/src/gcalendar.c index 3914f3a..5fe89c7 100644 --- a/src/gcalendar.c +++ b/src/gcalendar.c @@ -188,7 +188,7 @@ static void gc_get_changes_calendar(void *data, OSyncPluginInfo *info, OSyncCont else osync_trace(TRACE_INTERNAL, "first sync!\n"); - if (osync_objtype_sink_get_slowsync(plgdata->gcal_sink) || !timestamp) { + if (osync_objtype_sink_get_slowsync(plgdata->gcal_sink)) { osync_trace(TRACE_INTERNAL, "\n\t\tgcal: Client asked for slow syncing...\n"); slow_sync_flag = 1; result = gcal_get_events(plgdata->calendar, &(plgdata->all_events)); @@ -305,7 +305,7 @@ static void gc_get_changes_contact(void *data, OSyncPluginInfo *info, OSyncConte if (!plgdata->gcont_sink) return; timestamp = osync_anchor_retrieve(plgdata->gcal_anchor_path, "gcontact"); - if (osync_objtype_sink_get_slowsync(plgdata->gcont_sink) || !timestamp) { + if (osync_objtype_sink_get_slowsync(plgdata->gcont_sink)) { osync_trace(TRACE_INTERNAL, "\n\t\tgcont: Client asked for slow syncing...\n"); slow_sync_flag = 1; result = gcal_get_contacts(plgdata->contacts, &(plgdata->all_contacts)); -- 2.11.4.GIT