Thanks again for the reply!
Patrick Ohly wrote:
Is the full code available somewhere?
No, I still don't know what to do with it and I'm not sure in which form I
should upload it. Uploading it means maintain it ... etc. I was thinking to
upload it to the trinity desktop, but still it is not clear how it would
fit with the different distros. Another option would be to add it to
syncevolution - perhaps it is even more proper ... anyway short answer is
no - I could pass a zip file of it .. it's really not much code.
The last but not least is I do not feel confident because of this issue and
do not want to "release" is until it is solved.
In the situation from the log file, your insertItem is called with a
non-empty uid and thus needs update the corresponding item. Returning
ITEM_REPLACED for an update operation is unexpected and thus leads to
the sync error that you encountered.
The code that you are showing shouldn't be used in this case, or if it
is used (for example, because "update" always equals "delete + add"),
should return ITEM_OKAY.
Ah good. Update is indeed Del + Add (but item has the old ID). In the
opensync code it was the same and I didn't challenge my imagination that
much to invent something new.
So it looks like I misunderstood the ITEM_REPLACED meaning? Could you
please confirm once again. I have been struggling with these part of the
code for some time already.
1. even when update is implemented as del+add and the item has the old ID it
should return ITEM_OKAY?
2. does ITEM_REPLACED means that item has new ID and is to replace the old
item with the old ID?
IMO both can be implemented. Case/Question 2 would even save some lines of
code - as I am now explicitly setting the old id to the item.
Strange is only that I have such issues with calendar+todo only and a fact
is that it messes totally up in slow sync.
However (if you are right and I think you probably are) even if I end up in
slow sync for some reason, I would come out clean by using ITEM_OKAY.
Let me know what you think.
thanks in advance and regards