X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2FstackManagement%2Fmain.cpp;h=b471c3aeb7c622ebb00c3bfa54a1705a308dcb25;hb=36bb910c8e4ad26ab0b2c9618abc02c255b24e58;hp=d07ff13c51a7b8acb09d2e08027a71dd7fcbc765;hpb=86b328fa2c203e25d8c6e019241efbf07ed19232;p=anna.git diff --git a/example/diameter/stackManagement/main.cpp b/example/diameter/stackManagement/main.cpp index d07ff13..b471c3a 100644 --- a/example/diameter/stackManagement/main.cpp +++ b/example/diameter/stackManagement/main.cpp @@ -69,21 +69,20 @@ int main(int argc, char** argv) { stack::Engine & engine = stack::Engine::instantiate(); if(argc < 2) { - std::string msg = anna::functions::asString("Usage: %s ,\n e.g. '%s avps.xml commands.xml'", exec.c_str(), exec.c_str()); + std::string msg = anna::functions::asString("Usage: %s \n e.g. '%s avps.xml commands.xml'", exec.c_str(), exec.c_str()); _exit(msg); } - int index = 1; - const char *xmlFile = argv[index]; stack::Dictionary *dictionary; + int index = 1; try { dictionary = engine.createDictionary(0 /* general unique stack id */); dictionary->allowUpdates(); - while(xmlFile) { - dictionary->load(xmlFile); - xmlFile = argv[++index]; + while(index < argc) { + dictionary->load(argv[index]); + index++; } engine.removeStack(0);