From 042281235aa1d98f24f7c7e7af69b1ba1b5d6ff0 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 7 Dec 2000 22:55:11 +0000 Subject: Ugly hack for syncing until pcs can be altered (longer term) 2000-12-07 JP Rosevear * conduits/calendar/calendar-conduit.c (post_sync): Ugly hack for syncing until pcs can be altered (longer term) * conduits/todo/todo-conduit.c (post_sync): ditto svn path=/trunk/; revision=6849 --- calendar/ChangeLog | 7 +++++++ calendar/conduits/calendar/calendar-conduit.c | 10 +++++++++- calendar/conduits/todo/todo-conduit.c | 12 ++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f19828ee9f..e32d1079d9 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2000-12-07 JP Rosevear + + * conduits/calendar/calendar-conduit.c (post_sync): Ugly hack for syncing + until pcs can be altered (longer term) + + * conduits/todo/todo-conduit.c (post_sync): ditto + 2000-12-07 Chris Toshok * cal-client/Makefile.am (client_test_LDADD): add diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 2ded9bec6d..10bf56c404 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -786,7 +786,8 @@ post_sync (GnomePilotConduit *conduit, GnomePilotDBInfo *dbi, ECalConduitContext *ctxt) { - gchar *filename; + GList *changed; + gchar *filename, *change_id; LOG ("post_sync: Calendar Conduit v.%s", CONDUIT_VERSION); LOG ("---------------------------------------------------------\n"); @@ -795,6 +796,13 @@ post_sync (GnomePilotConduit *conduit, e_pilot_map_write (filename, ctxt->map); g_free (filename); + /* FIX ME ugly hack - our changes musn't count, this does introduce + * a race condition if anyone changes a record elsewhere during sycnc + */ + change_id = g_strdup_printf ("pilot-sync-evolution-calendar-%d", ctxt->cfg->pilot_id); + changed = cal_client_get_changes (ctxt->client, CALOBJ_TYPE_EVENT, change_id); + cal_client_change_list_free (changed); + return 0; } diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 15cb4286bb..236345afa1 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -594,7 +594,8 @@ post_sync (GnomePilotConduit *conduit, GnomePilotDBInfo *dbi, EToDoConduitContext *ctxt) { - gchar *filename; + GList *changed; + gchar *filename, *change_id; LOG ("post_sync: ToDo Conduit v.%s", CONDUIT_VERSION); LOG ("---------------------------------------------------------\n"); @@ -603,7 +604,14 @@ post_sync (GnomePilotConduit *conduit, e_pilot_map_write (filename, ctxt->map); e_pilot_map_destroy (ctxt->map); g_free (filename); - + + /* FIX ME ugly hack - our changes musn't count, this does introduce + * a race condition if anyone changes a record elsewhere during sycnc + */ + change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id); + changed = cal_client_get_changes (ctxt->client, CALOBJ_TYPE_TODO, change_id); + cal_client_change_list_free (changed); + return 0; } -- cgit v1.2.3