From 55894c46ed34bb4a8f06fecbaaa8f8bcb48c8784 Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Mon, 6 Apr 2015 03:57:05 +0200 Subject: [PATCH] Sequential access --- example/diameter/stackManagement/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); -- 2.20.1