X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FEngineImpl.cpp;h=5fff44908260cb1bc42cda2cb115183aadfe02f1;hb=6a05cda7553cf39d5b14539f9f4b9cf829c156a6;hp=5d24eb978fa21bcf61cef96d2955a8bb316a5150;hpb=129500a50678c43ff28fb0054d6197899b8c0b2c;p=anna.git diff --git a/source/diameter/codec/EngineImpl.cpp b/source/diameter/codec/EngineImpl.cpp index 5d24eb9..5fff449 100644 --- a/source/diameter/codec/EngineImpl.cpp +++ b/source/diameter/codec/EngineImpl.cpp @@ -23,114 +23,22 @@ #include - -namespace anna { -namespace diameter { -namespace codec { - -const char *MessageDTD = "\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -"; - - -} -} -} - using namespace anna::diameter::codec; //------------------------------------------------------------------------------ //----------------------------------------------------- EngineImpl::EngineImpl() //------------------------------------------------------------------------------ -EngineImpl::EngineImpl(const char* className) : +EngineImpl::EngineImpl(const char* className, const stack::Dictionary * dictionary) : anna::Component(className), - a_dictionary(NULL), + a_dictionary(dictionary), a_validationDepth(ValidationDepth::FirstError), a_validationMode(ValidationMode::AfterDecoding), + a_singleFailedAVP(true), a_ignoreFlags(false), - a_selectStackWithApplicationId(false), a_fixMode(FixMode::BeforeEncoding) { anna::diameter::sccs::activate(); anna::xml::functions::initialize(); - a_dtd.initialize(MessageDTD); -} - - -//------------------------------------------------------------------------------ -//-------------------------------------------------- EngineImpl::setDictionary() -//------------------------------------------------------------------------------ -const anna::diameter::stack::Dictionary *EngineImpl::setDictionary(unsigned int stackId) throw() { - a_dictionary = (stack::Engine::instantiate()).getDictionary(stackId); - return a_dictionary; } @@ -191,6 +99,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: "; @@ -209,6 +119,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");