On Fr, 2010-02-19 at 12:47 +0000, Patrick Ohly wrote:
> I can imagine that including stores which have not been alerted yet
> might be useful, in case that the client sends an <Alert> for one store
> first and later for another one, but sending all stores with the same
> URI as above doesn't make sense to me.
Attached is a patch which might do the job of suppressing sub-datastores
in the DevInf. Untested, because I cannot reproduce the situation here.
Jussi, can you apply it and check whether the "right thing" (= one
datastore for "calendar+todo") is sent?
Does it have any effect on the remaining problem with calendar updates
on the device?
--
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.
diff --git a/src/sysync/localengineds.cpp b/src/sysync/localengineds.cpp
index 4b61a79..ce753f5 100644
--- a/src/sysync/localengineds.cpp
+++ b/src/sysync/localengineds.cpp
@@ -3721,8 +3721,6 @@ SmlDevInfDatastorePtr_t TLocalEngineDS::newDevInfDatastore(bool aAsServer, bool
{
SmlDevInfDatastorePtr_t datastoreP;
- // create new
- datastoreP=SML_NEW(SmlDevInfDatastore_t);
// set only basic info, details must be added in derived class
// - sourceref is the name of the datastore,
// or for server, if already alerted, the name used in the alert
@@ -3731,7 +3729,13 @@ SmlDevInfDatastorePtr_t TLocalEngineDS::newDevInfDatastore(bool aAsServer, bool
string dotname;
#ifdef SYSYNC_SERVER
if (IS_SERVER && testState(dssta_serveralerted,false) && fSessionP->fDSPathInDevInf) {
- // server and already alerted - use datastore spec as sent from remote, minus CGI, as relative spec
+ // server and already alerted
+ // - don't include sub-datastores
+ if (fAsSubDatastoreOf) {
+ return NULL;
+ }
+
+ // - use datastore spec as sent from remote, minus CGI, as relative spec
dotname = URI_RELPREFIX;
dotname += fSessionP->SessionRelativeURI(fRemoteViewOfLocalURI.c_str());
if (!fSessionP->fDSCgiInDevInf) {
@@ -3747,6 +3751,9 @@ SmlDevInfDatastorePtr_t TLocalEngineDS::newDevInfDatastore(bool aAsServer, bool
// client or not yet alerted - just use datastore base name
StringObjPrintf(dotname,URI_RELPREFIX "%s",fName.c_str());
}
+
+ // create new
+ datastoreP=SML_NEW(SmlDevInfDatastore_t);
datastoreP->sourceref=newPCDataString(dotname);
#ifndef MINIMAL_CODE
// - Optional display name
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution