Use my own wrapper functions instead of trying to *directly* access the

2000-12-20  JP Rosevear  <jpr@helixcode.com>

	* conduit/address-conduit.c (match): Use my own wrapper
	functions instead of trying to *directly* access the the data
	structures my self
	(post_sync): Put in hack to prevent syncing the same records twice

svn path=/trunk/; revision=7104
This commit is contained in:
JP Rosevear
2000-12-20 18:18:40 +00:00
committed by JP Rosevear
parent f055dfa7c8
commit 0380a5d85e
2 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,13 @@
2000-12-20 JP Rosevear <jpr@helixcode.com>
* conduit/address-conduit.c (match): Use my own wrapper
functions instead of trying to *directly* access the the data
structures my self
(post_sync): Put in hack to prevent syncing the same records twice
2000-12-19 JP Rosevear <jpr@helixcode.com>
*conduit/address-conduit.c (ecard_from_remote_record): Convert
* conduit/address-conduit.c (ecard_from_remote_record): Convert
pilot strings to utf for the e-cards.
2000-12-19 JP Rosevear <jpr@helixcode.com>

View File

@ -652,7 +652,7 @@ post_sync (GnomePilotConduit *conduit,
GnomePilotDBInfo *dbi,
EAddrConduitContext *ctxt)
{
gchar *filename;
gchar *filename, *change_id;
LOG ("post_sync: Address Conduit v.%s", CONDUIT_VERSION);
LOG ("---------------------------------------------------------\n");
@ -660,6 +660,13 @@ post_sync (GnomePilotConduit *conduit,
filename = map_name (ctxt);
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-addressbook-%d", ctxt->cfg->pilot_id);
e_book_get_changes (ctxt->ebook, change_id, view_cb, ctxt);
g_free (change_id);
return 0;
}
@ -939,7 +946,7 @@ match (GnomePilotConduitSyncAbs *conduit,
g_return_val_if_fail (remote != NULL, -1);
*local = NULL;
uid = g_hash_table_lookup (ctxt->map->pid_map, &remote->ID);
uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID);
if (!uid)
return 0;