X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FEngineImpl.cpp;h=c25bec02f3e958adaa55d5611343be67f1b3e0cd;hb=c82a3818b279727e943a76343f3cf1a278ac9e19;hp=d9a614620c1f883b74a03d05832abb868e0fef3c;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/diameter/codec/EngineImpl.cpp b/source/diameter/codec/EngineImpl.cpp index d9a6146..c25bec0 100644 --- a/source/diameter/codec/EngineImpl.cpp +++ b/source/diameter/codec/EngineImpl.cpp @@ -116,6 +116,7 @@ EngineImpl::EngineImpl(const char* className) : a_dictionary(NULL), a_validationDepth(ValidationDepth::FirstError), a_validationMode(ValidationMode::AfterDecoding), + a_singleFailedAVP(true), a_ignoreFlags(false), a_selectStackWithApplicationId(false), a_fixMode(FixMode::BeforeEncoding) { @@ -144,6 +145,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 +165,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); @@ -185,6 +192,8 @@ std::string EngineImpl::asString(void) const throw() { result += asText(a_validationDepth); result += "\nValidationMode: "; result += asText(a_validationMode); + result += "\nSingle Failed-AVP: "; + result += a_singleFailedAVP ? "yes" : "no"; result += "\nIgnore flags: "; result += a_ignoreFlags ? "yes" : "no"; result += "\nFixMode: "; @@ -203,6 +212,7 @@ throw() { anna::xml::Node* result = parent->createChild("diameter.codec.EngineImpl"); result->createAttribute("ValidationDepth", asText(a_validationDepth)); result->createAttribute("ValidationMode", asText(a_validationMode)); + result->createAttribute("SingleFailedAVP", a_singleFailedAVP ? "yes" : "no"); result->createAttribute("IgnoreFlags", a_ignoreFlags ? "yes" : "no"); result->createAttribute("FixMode", asText(a_fixMode)); anna::xml::Node* dictionary = result->createChild("EngineImpl.ActivatedDictionary");