summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2011-06-21 09:35:49 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2011-06-21 09:35:49 +0200
commit92d2f367e72eccedb2cd1e103ec7770b6a426ef2 (patch)
treeab404c70205113f6f1c8e027eecd683eaa7b0e33
parentf244f3e783519c06a20556eeafe28d7dc7d8e1df (diff)
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.cpp8
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