Schema change from single value to multi value attribute, iterator is incorrectly used.
/* Adjust existing attributes.*/ ImmAttrValueMap::iterator oavi; for(oavi = object->mAttrValueMap.begin(); oavi != object->mAttrValueMap.end(); ++oavi) { /* TRACE_5("CHECKING existing attribute %s:%s for object %s", className.c_str(), oavi->first.c_str(), objectDn.c_str()); */ /* Change from single to multi-value requires change of value rep.*/ ai = changedAttrs.find(oavi->first); if(ai != changedAttrs.end()) { if((ai->second->mFlags & SA_IMM_ATTR_MULTI_VALUE) && (!oavi->second->isMultiValued())) { attrValue = new ImmAttrMultiValue(*(oavi->second)); TRACE_5("Schema change adjusted attribute %s in object:%s " "to be multivalued", oavi->first.c_str(), objectDn.c_str()); delete oavi->second; object->mAttrValueMap.erase(oavi); object->mAttrValueMap[ai->first] = attrValue; } } /* Correct object->mAdminOwnerAttrVal. */ if(oavi->first == std::string(SA_IMM_ATTR_ADMIN_OWNER_NAME)) { object->mAdminOwnerAttrVal = oavi->second; TRACE_5("Schema change corrected attr %s in object:%s", oavi->first.c_str(), objectDn.c_str()); } }
[staging:301ef2]
[staging:211dbe]
[staging:b61d9d]
[staging:f665d0]
changeset: 5876:f665d08c8d5f
tag: tip
parent: 5872:b1f8591c9b06
user: Neelakanta Reddy reddy.neelakanta@oracle.com
date: Fri Sep 19 19:18:30 2014 +0530
summary: imm:Removed the erase of iterator in migrateObj[#1097]
changeset: 5875:b61d9d86e856
branch: opensaf-4.5.x
parent: 5871:f72077302d66
user: Neelakanta Reddy reddy.neelakanta@oracle.com
date: Fri Sep 19 19:18:30 2014 +0530
summary: imm:Removed the erase of iterator in migrateObj[#1097]
changeset: 5874:211dbe6a399a
branch: opensaf-4.4.x
parent: 5870:f22e0f187c56
user: Neelakanta Reddy reddy.neelakanta@oracle.com
date: Fri Sep 19 19:18:30 2014 +0530
summary: imm:Removed the erase of iterator in migrateObj[#1097]
changeset: 5873:301ef2733224
branch: opensaf-4.3.x
parent: 5869:931f2e7d2178
user: Neelakanta Reddy reddy.neelakanta@oracle.com
date: Fri Sep 19 19:18:30 2014 +0530
summary: imm:Removed the erase of iterator in migrateObj[#1097]
Related
Tickets:
#1097Commit: [211dbe]
Commit: [301ef2]
Commit: [b61d9d]
Commit: [f665d0]