Hello! I think items that get deleted at the start of a refresh-from-server sync should be counted as part of the overall sync statistics. Otherwise we end up with a refresh-from-server sync which doesn't change anything but claims to have added items.
We have an open issue about that in SyncEvolution: http://bugzilla.moblin.org/show_bug.cgi?id=3314 Originally I thought that this was caused by SyncEvolution, but after checking the call stack, I see that it is the DB API DeleteSyncSet() call (or its internal fallback) which remove the items without counting them. That call is defined as: /*! This routine deletes all datasets from the database * * @param <aContext> The datastore context. * * @return error code * - LOCERR_OK ( =0 ), if successful * - LOCERR_NOTIMP ( =20030 ). For this case, the engine removes all items directly * - ... or any other SyncML error code, see Reference Manual */ _ENTRY_ TSyError DeleteSyncSet( CContext aContext ); If we add a retval (= DeleteSyncSet(CContext aContext, int *aNumDeleted), then we change the API and thus must introduce it as an alternative DeleteSyncSetCounted() (or something like that). I considered returning the number of deleted items as negative error values, but TSyError is defined as uInt16 and changing that might change some ABIs. It's hackish anyway. Any comments? Is fixing this worth an API change, if so, when? -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. _______________________________________________ os-libsynthesis mailing list [email protected] http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
