Hello! Sorry, late reply again. I expect to be more responsive going forward.
On Mi, 2010-11-24 at 09:05 +0000, [email protected] wrote: > Good morning! > > On Tue, 23 Nov 2010, Patrick Ohly wrote: > > Let's compare notes... is sysync::TLocalEngineDS::isDatastore called? Is > > it the same call stack as in my email? > > Yes, it is. I must have been disoriented in the code during the last > (nightly) debugging session. > > I've attached a cleaner patch. I hope it doesn't look like nit-picking, but I reworked the patch slightly to avoid a run of findLocalDataStoreByURI() with an empty URI and the copying of the target URI into a std::string. Revised patch attached and in "master" branch of libsynthesis on git.meego.com. > The synchronisation of my address book seems to work, currently only as > slow-sync and with repeated duplication of some (not all) entries. > > syncevolution still reports an error > > [ERROR] OBEX Request 1 got a failed response Internal server error > [ERROR] ObexTransprotAgent: Underlying transport error That is at the very end. I could imagine that the phone no longer expects a reply at that point and when it gets one, gets confused about whether the session has ended successfully. Or it parses the reply, but then doesn't quite grok the content. Either way, the log shows that the phone sends a presumably invalid anchor with value '0': | Saved Last Remote Client Anchor='1226', received <last> Remote Client Anchor='0' (must match for normal sync) This does not match, so we end up with a slow sync. > I'll send you the syncevolution-log.html by private mail (loglevel=2, > 7MB). > > Calendar synchronisation shows similar symptoms. > > BTW: loglevel = 4 in conjunction with over 700 contacts and slow sync > generates a really huge log file :) Maybe too large for Firefox ;) Oops ;-} Perhaps you can configure the local Evolution side to synchronize against an empty address book resp. calendar? For that create new database in Evolution, set "evolutionsource" to its name, then sync with "refresh-from-server" (to get rid of the large numbers of items on the phone, at least temporarily; I assume that they can be restored there later with another "refresh-from-server" with the real data). loglevel=4 is necessary to a) debug the content of the last reply to the phone (the one which triggers the OBEX "Internal server error") and b) debug the duplication/mangling of items during slow syncs and other data conversion issues. For a) please send an archive which includes the *.xml message dumps. For b), try to replicate each individual problem and send the syncevolution-log.html in which it occurs. However, I recently noticed that the slow sync resolution policy was a bit conservative and favored item duplication over merging of item data (which comes with the risk of data loss). People complain more about duplicate items than data loss (at least right now; I hope none will complain about that change once it reaches them ;-), so I changed that in the development versions and the syncevolution-1-1-branch: http://meego.gitorious.org/meego-middleware/syncevolution/commit/24cb098d5d4b45018299a35218baf045bb06a859 Does that make a difference in your duplication cases? -- 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.
>From 54411faadeb712b7851a46a10ae0ae7cd288ec1d Mon Sep 17 00:00:00 2001 From: Patrick Ohly <[email protected]> Date: Mon, 6 Dec 2010 13:25:33 +0100 Subject: [PATCH] sync session: handle empty Target URI As reported in the "[SyncEvolution] Sony Ericsson C510: No idea to get it working" mail thread, the C510 sends an empty Target URI. The Source URI contains the value we are looking for, so using that as fallback allows a sync to start. --- src/sysync/syncsession.cpp | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/sysync/syncsession.cpp b/src/sysync/syncsession.cpp index 8c92513..f3ff5f3 100644 --- a/src/sysync/syncsession.cpp +++ b/src/sysync/syncsession.cpp @@ -3622,8 +3622,14 @@ localstatus TSyncSession::initSync( // search for local datastore first string cgiOptions; - // - search for datastore and obtain possible CGI - fLocalSyncDatastoreP = findLocalDataStoreByURI(SessionRelativeURI(aLocalDatastoreURI),&cgiOptions); + // - search for datastore and obtain possible CGI; + // fallback to remote datastore URI is for Sony Ericsson C510, + // which sends an empty target (= local) URI (also needs + // to be done in Alert handling) + fLocalSyncDatastoreP = findLocalDataStoreByURI(SessionRelativeURI((!aLocalDatastoreURI || + !aLocalDatastoreURI[0]) ? + aRemoteDatastoreURI : + aLocalDatastoreURI),&cgiOptions); if (!fLocalSyncDatastoreP) { // no such local datastore return 404; @@ -4790,7 +4796,7 @@ TSmlCommand *TSyncSession::processAlertItem( case 204: case 205: // Sync resume alert - case 225: + case 225: { // Synchronisation initialisation alerts // - test if context is ok if (fIncomingState!=psta_init && fIncomingState!=psta_initsync) { @@ -4804,8 +4810,14 @@ TSmlCommand *TSyncSession::processAlertItem( return NULL; // no alert sent back } // find requested database by URI + const char *target = smlSrcTargLocURIToCharP(aItemP->target); + if (!target || !target[0]) { + // same fallback for Sony Ericsson C510 as in + // TSyncSession::initSync() + target = smlSrcTargLocURIToCharP(aItemP->source); + } datastoreP = findLocalDataStoreByURI( - smlSrcTargLocURIToCharP(aItemP->target), // target as sent from remote + target, // target as sent from remote &optionsCGI, // options, if any &identifyingTargetURI // identifying part of URI (CGI removed) ); @@ -4850,6 +4862,7 @@ TSmlCommand *TSyncSession::processAlertItem( aStatusCommand.addItem(itemP); // add it to status } break; + } case 224 : // Suspend alert SuspendSession(514); -- 1.7.2.3
_______________________________________________ SyncEvolution mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution
