X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FEngineImpl.cpp;h=5d24eb978fa21bcf61cef96d2955a8bb316a5150;hb=129af2a9a7c287843be5bd443c5b1ad9b08438a8;hp=d9a614620c1f883b74a03d05832abb868e0fef3c;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/diameter/codec/EngineImpl.cpp b/source/diameter/codec/EngineImpl.cpp index d9a6146..5d24eb9 100644 --- a/source/diameter/codec/EngineImpl.cpp +++ b/source/diameter/codec/EngineImpl.cpp @@ -144,6 +144,9 @@ Avp* EngineImpl::createAvp(const AvpId *id) throw(anna::RuntimeException) { if((result = allocateAvp()) == NULL) throw anna::RuntimeException("diameter::codec::EngineImpl::allocateAvp returns NULL", ANNA_FILE_LOCATION); + // Sets engine + result->setEngine((Engine*)this); + //result->clear(); better clear this at releaseAvp(), see class-help implementation example if(id) result->setId(*id); @@ -161,6 +164,9 @@ Message* EngineImpl::createMessage(const CommandId *id) throw(anna::RuntimeExcep if((result = allocateMessage()) == NULL) throw anna::RuntimeException("diameter::codec::EngineImpl::allocateMessage returns NULL", ANNA_FILE_LOCATION); + // Sets engine + result->setEngine((Engine*)this); + //result->clear(); better clear this at releaseMessage(), see class-help implementation example if(id) result->setId(*id);