diff -r 98a7181d2ce7 -r 8b5d60ce1e94 commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapper.cpp --- a/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapper.cpp Fri Mar 12 15:49:41 2010 +0200 +++ b/commsfwtools/preparedefaultcommsdatabase/src/CommsDatMapper.cpp Mon Mar 15 12:45:15 2010 +0200 @@ -1602,29 +1602,24 @@ } } - CCDAccessPointRecord* ipprotoAP = NULL; - - if (!CommsDatMapperAndValidator::IsIPProtoAPAlreadyExistL(linkAPTagId, iSession.iOwner)) + CCDAccessPointRecord* ipProtoAP = CommsDatMapperAndValidator::LoadIPProtoAccessPoint(linkAPTagId, iSession.iOwner); + + if (!ipProtoAP) { //The IPProto AP is not existing yet. Generate one. - ipprotoAP = CommsDatMapperAndValidator::GenerateIPProtoAPL(IPProtoBaseTagId, - linkAPTagId, - iSession.iOwner); - - CleanupStack::PushL(ipprotoAP); + ipProtoAP = CommsDatMapperAndValidator::GenerateIPProtoAPL(IPProtoBaseTagId, linkAPTagId, iSession.iOwner); + CleanupStack::PushL(ipProtoAP); //save the generated AP record - ipprotoAP->StoreL(iSession.iOwner); + ipProtoAP->StoreL(iSession.iOwner); } else { //The IPProto AP is already exsiting. Use that one. - ipprotoAP = CommsDatMapperAndValidator::LoadTheAPL(linkAPTagId, iSession.iOwner); - - CleanupStack::PushL(ipprotoAP); + CleanupStack::PushL(ipProtoAP); } - TMDBElementId elemId = ipprotoAP->ElementId(); + TMDBElementId elemId = ipProtoAP->ElementId(); elemId &= KCDMaskHideAttrAndRes; TMDBElementId tableAndRecordBitMask = KCDMaskShowRecordType | KCDMaskShowRecordId; elemId &= tableAndRecordBitMask; @@ -1642,7 +1637,7 @@ CommsDatMapperAndValidator::ModifyDefaultTierRecordL(elemId, iSession.iOwner); } - CleanupStack::PopAndDestroy(ipprotoAP); + CleanupStack::PopAndDestroy(ipProtoAP); } void CCDMapperIAPPrioritySelectionPolicyRecord::DeleteIPProtoAPL(CMDBRecordLink*& aAPPriorityField)