|
From: Daniel G. <go...@b1...> - 2009-11-05 16:40:49
|
Hi,
just implemented the osync_context_report_uid_update() function for sync-
plugins.
This functions allows to support protocols or synchronization-interfaces which
replace the initial UID after the change got comitted/written, and report them
after all changes got written.
There are already lots of plugins which overwrite the UID of an OSyncChange
during the commit() function. But this works only for protocols/interfaces
which provide the new UID immediately after the single write of a change.
Protocols like SyncML for example, maybe there are others as well, which
provide the information about a "mapping update" (or changed UIDs of just
written entries) after all changes got written.
Now we can handle this flawless with the introduction of
osync_context_report_uid_update().
Plugins can now call this function in the sync_done() function and report all
updated UIDs, by just providing the old-UID and the new-UID. OpenSync will
take care the mapping of the right entries doesn't get lost. OpenSync also
updates this information inside the hashtable - if used.
The interface looks like this:
void osync_context_report_uid_update(OSyncContext *ctx,
const char *olduid, const char *newuid);
This issue solves a well known problem of the SyncML plugin and the OpenSync
IPC by deadlocking after 4 entries in a row get written to the SyncML-peer.
This is not yet implemented in the SyncML plugin.
For more information see http://opensync.org/ticket/1161
Best Regards,
Daniel
--
Daniel Gollub Geschaeftsfuehrer: Ralph Dehner
FOSS Developer Unternehmenssitz: Vohburg
B1 Systems GmbH Amtsgericht: Ingolstadt
Mobil: +49-(0)-160 47 73 970 Handelsregister: HRB 3537
EMail: go...@b1... http://www.b1-systems.de
Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg
http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D
|