X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Ftme%2Fmain.cpp;h=fdfe996bbbbdaf8e9aebe15bf2e968ddb517c09c;hb=64cc135e716c2ef018227375fc4f15ff0670fdf7;hp=3bd2df513a6d44e25731b0d966a6db925fb8c220;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/example/diameter/tme/main.cpp b/example/diameter/tme/main.cpp index 3bd2df5..fdfe996 100644 --- a/example/diameter/tme/main.cpp +++ b/example/diameter/tme/main.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include @@ -57,7 +57,6 @@ int main(int argc, char** argv) { anna::time::functions::setControlPoint(); // start control point (application lifetime) anna::diameter::stack::Engine & stackEngine = anna::diameter::stack::Engine::instantiate(); anna::diameter::stack::Dictionary *dictionary; - anna::diameter::codec::tme::Engine *codecEngine = new anna::diameter::codec::tme::Engine(); std::string exec = argv[0]; std::string param = argv[1] ? argv[1] : ""; @@ -93,18 +92,18 @@ int main(int argc, char** argv) { dictionary->load(param + "/avps_tgpp.xml"); dictionary->load(param + "/avps_tme.xml"); dictionary->load(param + "/commands_dccaOCS-CS_HuaweiNGIN_de-es.xml"); - codecEngine->setDictionary(dictionary); // Trace: LOGINFORMATION(Logger::information(stackEngine.asString(), ANNA_FILE_LOCATION)); LOGDEBUG(Logger::debug(dictionary->asString(), ANNA_FILE_LOCATION)); - LOGDEBUG(Logger::debug(codecEngine->asString(), ANNA_FILE_LOCATION)); } catch(anna::RuntimeException &ex) { ex.trace(); std::cout << ex.getText() << std::endl; } // Build CCA - tmeMessage cca; + anna::diameter::codec::Engine *codecEngine = new anna::diameter::codec::Engine("TME Engine", dictionary); + LOGDEBUG(Logger::debug(codecEngine->asString(), ANNA_FILE_LOCATION)); + tmeMessage cca(codecEngine); cca.setId("Credit-Control-Answer"); tmeAvp *sid = (tmeAvp*)cca.addAvp("Session-Id"); tmeAvp *ohst = (tmeAvp*)cca.addAvp("Origin-Host");