- **status**: review --> fixed
- **Comment**:

[staging:301ef2]
[staging:211dbe]
[staging:b61d9d]
[staging:f665d0]

changeset:   5876:f665d08c8d5f
tag:         tip
parent:      5872:b1f8591c9b06
user:        Neelakanta Reddy <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
date:        Fri Sep 19 19:18:30 2014 +0530
summary:     imm:Removed the erase of iterator in migrateObj[#1097]






---

** [tickets:#1097] imm: using invalid iterator in migrateObj**

**Status:** fixed
**Milestone:** 4.3.3
**Created:** Tue Sep 16, 2014 02:24 PM UTC by Zoran Milinkovic
**Last Updated:** Fri Sep 19, 2014 12:50 PM UTC
**Owner:** Neelakanta Reddy

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());
        }
    }


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to