X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FEngineImpl.cpp;h=50b8134ccd996e38d79476b16e5cea3210c45a88;hb=e782294456d0877aa8fc05aa931291ac79808eb3;hp=5fff44908260cb1bc42cda2cb115183aadfe02f1;hpb=e80e62a5cf9aacad1a9551c68c432147ef98cd29;p=anna.git diff --git a/source/diameter/codec/EngineImpl.cpp b/source/diameter/codec/EngineImpl.cpp index 5fff449..50b8134 100644 --- a/source/diameter/codec/EngineImpl.cpp +++ b/source/diameter/codec/EngineImpl.cpp @@ -85,9 +85,13 @@ Message* EngineImpl::createMessage(const CommandId *id) throw(anna::RuntimeExcep //------------------------------------------------------------------------------ //-------------------------------------------------- EngineImpl::createMessage() //------------------------------------------------------------------------------ -Message *EngineImpl::createMessage(const std::string & xmlPathFile) throw(anna::RuntimeException) { +Message *EngineImpl::createMessage(const std::string & xmlPathFile_or_string, bool pathfile_or_string) throw(anna::RuntimeException) { Message *result = createMessage(); - result->loadXML(xmlPathFile); + if (pathfile_or_string) + result->loadXMLFile(xmlPathFile_or_string); + else + result->loadXMLString(xmlPathFile_or_string); + return result; } @@ -106,7 +110,7 @@ std::string EngineImpl::asString(void) const throw() { result += "\nFixMode: "; result += asText(a_fixMode); result += "\nActivated Dictionary: "; - result += a_dictionary ? (a_dictionary->getName()) : ""; + result += a_dictionary ? (a_dictionary->getName()) : "[null]"; return result; } @@ -122,7 +126,7 @@ throw() { 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"); + result->createChild("EngineImpl.ActivatedDictionary"); if(a_dictionary) a_dictionary->asXML(result);