From: Eduardo Ramos Testillano Date: Mon, 6 Apr 2015 01:57:05 +0000 (+0200) Subject: Sequential access X-Git-Tag: REFACTORING_TESTING_LIBRARY~186 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=55894c46ed34bb4a8f06fecbaaa8f8bcb48c8784;p=anna.git Sequential access --- diff --git a/example/diameter/stackManagement/main.cpp b/example/diameter/stackManagement/main.cpp index d07ff13..8d3a978 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);