Hello! Sorry, I haven't had the time to look into this earlier.
On Do, 2010-11-04 at 10:11 +0000, [email protected] wrote: > On Thu, 4 Nov 2010, Patrick Ohly wrote: > > That's expected. I don't know where libsynthesis stores aliases, but > > they must be somewhere and should be used when locating the right data > > store based on the Target URI sent to us. > > Ok. TLocalEngineDS defines an isDatastoreAlias function, maybe this could > be used. There is also a definition for isDatastore, which considers the > aliases, but TSyncSession::findLocalDataStore calls > TSyncDataStore::isDatastore, although these are TLocalEngineDS objects: > > typedef std::list<TLocalEngineDS*> TLocalDataStorePContainer; // contains > local data stores > > I'm a little bit worried now. Why? I've looked at TLocalEngineDS::isDataStore(), and it does everything we need, in particular it checks for the alias: 1373 int res = inherited::isDatastore(basename.c_str()); 1374 if (res==0) { 1375 // Not main name: compare with aliases 1376 res = fDSConfigP->isDatastoreAlias(basename.c_str()); 1377 } 1378 return res; When called for a Nokia phone (Target = "./Contacts"), the alias is used to find the datastore. The call stack is: #0 sysync::TLocalEngineDS::isDatastore (this=0x1023220, aDatastoreURI=0x1025232 "Contacts") at /home/pohly/syncevolution/libsynthesis/src/sysync/localengineds.cpp:1376 #1 0x0000000000837955 in sysync::TSyncSession::findLocalDataStore (this=0xd56640, aDatastoreURI=0x1025232 "Contacts") at /home/pohly/syncevolution/libsynthesis/src/sysync/syncsession.cpp:3201 #2 0x00000000008378c4 in sysync::TSyncSession::findLocalDataStoreByURI ( this=0xd56640, aURI=0x1025230 "./Contacts", aOptions=0x7fffffffa1b0, aIdentifyingURI=0x7fffffffa1a0) at /home/pohly/syncevolution/libsynthesis/src/sysync/syncsession.cpp:3188 #3 0x000000000083e582 in sysync::TSyncSession::processAlertItem (this=0xd56640, aAlertCode=202, aItemP=0xd21700, aCredP=0x0, aStatusCommand=..., alocaldatastor...@0x1025360) ... > > Perhaps the right fix is to ensure that the correct aLocalDatastoreURI > > is set? I could imagine that this needs to be "addressbook", even in the > > case of "Target URI Contacts" and <alias name="Contacts">. > > It seems so. Can you try this out with a working phone? Can you remind me what the problem was with my patch applied and uri=Contacts set in your config? I tried to "simulate" your phone by ignoring the Target value sent by the phone, but that doesn't work with the Nokia because its source is "./C:Contacts.cdb", which does not match the "Contacts" alias which has to be set for "addressbook" (otherwise the phone does not start a sync at all). -- 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. _______________________________________________ SyncEvolution mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution
