//---------------------------------------------------------------- Avp::addAvp()
//------------------------------------------------------------------------------
Avp * Avp::addAvp(avp_container &avps, int &insertionPositionForChilds, AvpId id, Engine *engine) throw() {
- Avp * result = engine->allocateAvp();
+ Avp * result = engine->createAvp(NULL);
result->setId(id);
addChild(avps, insertionPositionForChilds, result);
return result;
while(avpPos < size) {
try {
- avp = getEngine()->allocateAvp();
+ avp = getEngine()->createAvp(NULL);
db.assign(buffer + avpPos, size - avpPos /* is valid to pass total size (indeed i don't know the real avp size) because it will be limited and this has deep copy disabled (no memory is reserved) */);
avp -> decode(db, me, answer);
} catch(anna::RuntimeException &ex) {
}
try {
- avp = getEngine()->allocateAvp();
+ avp = getEngine()->createAvp(NULL);
avp -> fromXML(*it);
} catch(anna::RuntimeException &ex) {
getEngine()->releaseAvp(avp);
while(avpPos < dataBytes) {
try {
- avp = getEngine()->allocateAvp();
+ avp = getEngine()->createAvp(NULL);
db_aux.assign(startData + avpPos, dataBytes - avpPos /* is valid to pass total length (indeed i don't know the real avp length) because it will be limited and this has deep copy disabled (no memory is reserved) */);
avp -> decode(db_aux, parent, answer);
} catch(anna::RuntimeException &ex) {
}
try {
- avp = getEngine()->allocateAvp();
+ avp = getEngine()->createAvp(NULL);
avp -> fromXML(*it);
} catch(anna::RuntimeException &ex) {
getEngine()->releaseAvp(avp);