diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-06-21 09:35:49 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-06-21 09:35:49 +0200 |
commit | 92d2f367e72eccedb2cd1e103ec7770b6a426ef2 (patch) | |
tree | ab404c70205113f6f1c8e027eecd683eaa7b0e33 | |
parent | f244f3e783519c06a20556eeafe28d7dc7d8e1df (diff) |
engine: updated implementation of "unprocessed" wildcard propertieslibsynthesis_3.4.0.16+syncevolution-1-1-99-5blibsynthesis_3.4.0.16+syncevolution-1-1-99-5alibsynthesis_3.4.0.16+syncevolution-1-1-99-5overridedevinf
The 3529d3cb commit which introduced support for "unprocessed" wildcard
properties added the logic that such properties are always considered
"available" regardless of the actual CtCap of the peer.
This has the undesirable effect that the content of these properties
are removed when receiving an update from a peer which doesn't
support them.
Therefore this commit reverts that part of 3529d3cb: setfieldoptions()
with NULL as first parameter now only enables mandatory properties,
as it did before the introduction of "unprocessed" properties.
"unprocessed" properties need to be listed explicitly in the CtCap
like any other property. This is currently untested.
-rw-r--r-- | src/sysync/mimedirprofile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sysync/mimedirprofile.cpp b/src/sysync/mimedirprofile.cpp index 27b1abb..4105d03 100644 --- a/src/sysync/mimedirprofile.cpp +++ b/src/sysync/mimedirprofile.cpp @@ -5139,7 +5139,7 @@ bool TMimeDirProfileHandler::analyzeCTCap(SmlDevInfCTCapPtr_t aCTCapP, TSyncItem for (sInt16 i=0; i<itemTypeP->fFieldDefinitionsP->numFields(); i++) { itemTypeP->getFieldOptions(i)->available=false; } - // force mandatory+unprocessed properties to be always "available" + // force mandatory properties to be always "available" setfieldoptions(NULL,fProfileDefinitionP,itemTypeP); } // now we have received fields @@ -5174,9 +5174,9 @@ bool TMimeDirProfileHandler::setLevelOptions(const char *aLevelName, bool aEnabl // enable fields related to aPropP property in profiles recursively -// or (if aPropP is NULL), enable fields of all mandatory (or wildcard) properties +// or (if aPropP is NULL), enable fields of all mandatory properties void TMimeDirProfileHandler::setfieldoptions( - const SmlDevInfCTDataPtr_t aPropP, // property to enable fields for, NULL if all mandatory+unprocessed properties should be enabled + const SmlDevInfCTDataPtr_t aPropP, // property to enable fields for, NULL if all mandatory properties should be enabled const TProfileDefinition *aProfileP, TMimeDirItemType *aItemTypeP ) @@ -5233,7 +5233,7 @@ void TMimeDirProfileHandler::setfieldoptions( while (propdefP) { // compare if ( - (propname==NULL && (propdefP->mandatory || propdefP->unprocessed)) || + (propname==NULL && propdefP->mandatory) || (propname && (strucmp(propname,TCFG_CSTR(propdefP->propname))==0)) ) { // match (or enabling mandatory) -> enable all fields that are related to this property |