Hello!
Does the binfile-based SyncML client support <superdatastore> in its
config? This would be useful for OVI.com, which seems to have issues
when using separate event and todo URIs (as Lukas found out when he
tested it).
I'm trying to use a <superdatastore> and get a segfault:
// - find target for profile by DB ID/name. Returns target index or -1 if none
found
sInt32 TBinfileClientConfig::findOrCreateTargetIndexByDBInfo(
uInt32 aProfileID, // profile to search targets for
uInt32 aLocalDBTypeID,
const char *aLocalDBName // can be NULL if name does not matter
)
{
sInt32 targidx;
TBinfileDBSyncTarget target;
targidx=findTargetIndexByDBInfo(aProfileID,aLocalDBTypeID,aLocalDBName);
if (targidx<0) {
// does not exist yet, create it now
TLocalDSList::iterator pos;
for (pos=fDatastores.begin();pos!=fDatastores.end();pos++) {
TBinfileDSConfig *cfgP = static_cast<TBinfileDSConfig *>(*pos);
if (
cfgP->fLocalDBTypeID==aLocalDBTypeID &&
(aLocalDBName==NULL || cfgP->fLocalDBPath==aLocalDBName)
) {
// right datastore found
===> cfgP->initTarget(target,aProfileID,NULL,DEFAULT_DATASTORES_ENABLED); //
init default
// write new target and get a index back
targidx=writeTarget(-1,target);
// done
break;
}
}
}
return targidx;
} // findOrCreateTargetIndexByDBInfo
cfgP->initTarget() jumps to NULL and printing the content of cfgP also
shows some garbage. I suspect that the static_cast<TBinfileDSConfig
*>(*pos) is invalid for super datastores. Does that sound plausible?
I verified that the
TBinfileClientConfig::findOrCreateTargetIndexByDBInfo() is indeed for
the <superdatastore> by comparing the aLocalDBTypeID.
--
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