// We will register a scope per stack id registered. The counters will be dynamically registered at count method.
anna::diameter::comm::ApplicationMessageOamModule & appMsgOamModule = anna::diameter::comm::ApplicationMessageOamModule::instantiate();
appMsgOamModule.enableCounters(); // this special module is disabled by default (the only)
- static int scope_id = 3;
+ static int scope_id = 3 + appMsgOamModule.scopes();
+
unsigned int id_value;
std::string codecEngineName;
outfile.write(xmlString.c_str(), xmlString.size());
outfile.close();
} else if((opType == "hide") || (opType == "show") || (opType == "hidden") || (opType == "shown")) {
- return eop.visibility(opt_response, opType, param1, (param2 != "") ? atoi(param2.c_str()) : -1);
+ result = eop.visibility(opt_response, opType, param1, (param2 != "") ? atoi(param2.c_str()) : -1);
} else if((opType == "sendxml2e") || (opType == "sendhex2e")) {
anna::diameter::comm::Message *msg;
if(getOperatedHost()->logEnabled()) {
anna::diameter::comm::Server *usedServer = getOperatedEntity()->getLastUsedResource();
anna::diameter::comm::ClientSession *usedClientSession = usedServer ? usedServer->getLastUsedResource() : NULL;
- std::string detail = usedClientSession ? usedClientSession->asString() : "<null client session>"; // shouldn't happen
+ std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // shouldn't happen
getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2e" : "send2eError"), detail);
}
} else if((opType == "sendxml2c") || (opType == "sendhex2c")) {
// Detailed log:
if(getOperatedHost()->logEnabled()) {
anna::diameter::comm::ServerSession *usedServerSession = getOperatedServer()->getLastUsedResource();
- std::string detail = usedServerSession ? usedServerSession->asString() : "<null server session>"; // shouldn't happen
+ std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // shouldn't happen
getOperatedHost()->writeLogFile(codecMsg, (success ? "sent2c" : "send2cError"), detail);
}
} else if(opType == "answerxml2e") {
limit = atoi(param2.c_str());
testManager.setInProgressLimit(limit);
opt_response = "new in-progress limit: ";
- opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "<no limit>";
+ opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "[no limit]";
}
else {
opt_response = "in-progress limit amount: ";
limit = testManager.getInProgressLimit();
- opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "<no limit>";
+ opt_response += (limit != UINT_MAX) ? anna::functions::asString(limit) : "[no limit]";
opt_response += "; currently there are ";
opt_response += anna::functions::asString(testManager.getInProgressCount());
opt_response += " test cases running";
if (numParams > 1)
throw anna::RuntimeException("Wrong body content format on HTTP Request. Check 'HELP.md' for more information.", ANNA_FILE_LOCATION);
- if (testManager.clearPool()) {
- opt_response = "all the programmed test cases have been dropped";
- }
- else {
- opt_response = "there are not programmed test cases to be removed";
- }
+ result = testManager.clearPool(opt_response);
}
else if(param1 == "junit") {
response = testManager.junitAsXMLString();