X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=ffc814bcf9e585eaeb86cdbdc040e870302cf1eb;hb=eb1546671c9e29befae4bd5052de9ee804b1a389;hp=4452ee4e225d3b08e7cb1aae439b1387a30bdbb5;hpb=f9534159f3b43cbf74eccf88723ee740c69eb204;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index 4452ee4..ffc814b 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -1673,9 +1673,9 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons else if(param1 == "repeats") { if (numParams > 2 || numParams < 2) throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION); - - testManager.setPoolRepeats(atoi(param2.c_str())); - int repeats = testManager.getPoolRepeats(); + int repeats = atoi(param2.c_str()); + if (repeats < 0) repeats = -1; + testManager.setPoolRepeats(repeats); std::string nolimit = (repeats != -1) ? "":" [no limit]"; opt_response_content += anna::functions::asString("Pool repeats: %d%s (current cycle: %d)", repeats, nolimit.c_str(), testManager.getPoolCycle()); }