* Allow zeroed cntRecordPeriod as special case (no counters dump)
instead of throwing exception for invalid time measure.
* Remove symlink to services_example in st client deployment and
improve help to guide to correct configuration of services.
* Alert about restarting ADML processes when dynamic library has
been updated/selected.
* Fixed ApplicationMessageOamModule key (eventId now includes
%s_%s instead of %s%s to avoid possible ambiguity in a key
definition from to values.
* Hide exception for non Result-Code in diameter answer,
because this AVP is optional even in some answers.
* Initialize resultCode to -1 instead of 0 to avoid having a
ResultCode0 as counter prefixes.
* Remove warning from OriginHostManager::getOriginHost when
item is not found, because this is used also to discard
redefinitions when something already exists in the map.
* CodecEngine getter has been fixed to cover the monostack
case where the stack id does not correspond to the app id
in the requests but the value of 0 (normally).
* Clarify MessageDeque warnings when answer is analyzed
during configured from original request: this seems to
be missing warnings from request message findings but
that are coming from answer !
// Counters record procedure:
const char *varname = "cntRecordPeriod";
// Counters record procedure:
const char *varname = "cntRecordPeriod";
- anna::Millisecond cntRecordPeriod = (cl.exists(varname)) ? checkTimeMeasure(varname, cl.getValue(varname)) : (anna::Millisecond)300000;
+ anna::Millisecond cntRecordPeriod;
+ try {
+ cntRecordPeriod = (cl.exists(varname)) ? checkTimeMeasure(varname, cl.getValue(varname)) : (anna::Millisecond)300000;
+ }
+ catch(anna::RuntimeException &ex) {
+ if (cntRecordPeriod != 0) throw ex;
+ }
+
if(cntRecordPeriod != 0) {
a_counterRecorderClock = new MyCounterRecorderClock("Counters record procedure clock", cntRecordPeriod); // clock
std::string cntDir = ".";
if(cntRecordPeriod != 0) {
a_counterRecorderClock = new MyCounterRecorderClock("Counters record procedure clock", cntRecordPeriod); // clock
std::string cntDir = ".";
if [ "$option" = "s" ]
then
cd $DPATH
if [ "$option" = "s" ]
then
cd $DPATH
- ln -s services_example services
+ #ln -s services_example services
mv run.sh .run-one.sh
mv run_all.sh run.sh
mv operation.sh .operation-one.sh
mv run.sh .run-one.sh
mv run_all.sh run.sh
mv operation.sh .operation-one.sh
# FUNCTIONS #
#############
_exit () {
# FUNCTIONS #
#############
_exit () {
-[ ! -d services ] && _exit "Missing services configuration (expecting '$PWD/services' directory) !"
+[ ! -d services ] && _exit "Missing services configuration (expecting '$PWD/services' directory).\nTake a look to 'services_example' and './dynlibs' scenaries stuff to complete your services.\n\nFor example:\n ln -s services_example services\n cp dynlibs/gx/00001/services/* services\n Edit CER files and 'services.msk' there, to fit your needs."
calculate_deployment_layout
calculate_deployment_layout
TESTCASE_DIR=$(readlink -f dynlibs/libanna_launcher_procedure_default_shared.so | xargs dirname)
DYNAMIC_SUFFIX_FILE=$TESTCASE_DIR/dynamic.suffix
TESTCASE_DIR=$(readlink -f dynlibs/libanna_launcher_procedure_default_shared.so | xargs dirname)
DYNAMIC_SUFFIX_FILE=$TESTCASE_DIR/dynamic.suffix
- [ ! -f $DYNAMIC_SUFFIX_FILE ] && _exit "Missing '$DYNAMIC_SUFFIX_FILE' file.\nUse 'dynlibs/select.sh' to change the dynamic procedure and restart the ADML instances."
+ [ ! -f $DYNAMIC_SUFFIX_FILE ] && _exit "Missing '$DYNAMIC_SUFFIX_FILE' file.\nUse 'dynlibs/select.sh' to change the dynamic procedure and very important: RESTART the ADML instances."
dynamic_suffix=( $(grep -v ^# $DYNAMIC_SUFFIX_FILE) )
# Multiple scenarios:
dynamic_suffix=( $(grep -v ^# $DYNAMIC_SUFFIX_FILE) )
# Multiple scenarios:
ln -sf $option $dynamicProcedureLibName
[ $? -ne 0 ] && { rm -f $dynamicProcedureLibName ; echo -e "\nInvalid file (must be a dynamic procedure library) !\n" ; exit 1 ; }
echo
ln -sf $option $dynamicProcedureLibName
[ $? -ne 0 ] && { rm -f $dynamicProcedureLibName ; echo -e "\nInvalid file (must be a dynamic procedure library) !\n" ; exit 1 ; }
echo
+echo "Library enabled."
+echo
+echo
+echo "IMPORTANT: remember to Re-Start the affected ADML instances:"
+echo
+echo " pkill -9 ADML ; ./run.sh"
setActiveCounterScope(scopeId);
// Build event id: <message code>_<result code>
setActiveCounterScope(scopeId);
// Build event id: <message code>_<result code>
- std::string eventId = anna::functions::asString("%d%d", messageCode, resultCode);
+ std::string eventId = anna::functions::asString("%d_%d", messageCode, resultCode);
std::map<std::string /* event id */, int /* base offset */>::const_iterator eventMap_it = a_eventMap.find(eventId);
std::map<std::string /* event id */, int /* base offset */>::const_iterator eventMap_it = a_eventMap.find(eventId);
- int baseOffset = eventMap_it->second;
if (eventMap_it == a_eventMap.end()) {
int capacity = anna::oam::CounterScope::MaxCounter / getCounterTypes();
if (eventMap_it == a_eventMap.end()) {
int capacity = anna::oam::CounterScope::MaxCounter / getCounterTypes();
registerCounter(baseOffset + offset, counterName, baseOffset + offset);
//}
}
registerCounter(baseOffset + offset, counterName, baseOffset + offset);
//}
}
+ else {
+ baseOffset = eventMap_it->second;
+ }
// Count
Module::count(baseOffset + type, amount);
// Count
Module::count(baseOffset + type, amount);
/////////////////////////////
bool doUnbind = false;
bool immediateUnbind = false;
/////////////////////////////
bool doUnbind = false;
bool immediateUnbind = false;
try {
resultCode = helpers::base::functions::getResultCode(db);
} catch(anna::RuntimeException& ex) {
try {
resultCode = helpers::base::functions::getResultCode(db);
} catch(anna::RuntimeException& ex) {
+ // Not always mandatory ...
+ //ex.trace();
if (it != a_origin_hosts.end())
return it->second;
if (it != a_origin_hosts.end())
return it->second;
- LOGWARNING(
- std::string msg = "Unknown origin host node with name '"; msg += name; msg += "'";
- anna::Logger::warning(msg, ANNA_FILE_LOCATION);
- );
-
if (it != a_appid_codec_engines.end())
return it->second;
if (it != a_appid_codec_engines.end())
return it->second;
+ // Just in case:
+ return getMonoStackCodecEngine();
}
void EngineManager::registerCodecEngine(const ApplicationId &appid, Engine* engine) throw() {
}
void EngineManager::registerCodecEngine(const ApplicationId &appid, Engine* engine) throw() {
// Session-Id if exists:
const Avp *reqSessionId = request.getAvp(helpers::base::AVPID__Session_Id, 1, anna::Exception::Mode::Ignore);
// Session-Id if exists:
const Avp *reqSessionId = request.getAvp(helpers::base::AVPID__Session_Id, 1, anna::Exception::Mode::Ignore);
+ LOGDEBUG(anna::Logger::debug("Check answer message AVPs Session-Id, Origin-Host and Origin-Realm => replace them if missing, with request session-id & node configuration:", ANNA_FILE_LOCATION));
+
if(reqSessionId)
if(!getAvp(helpers::base::AVPID__Session_Id, 1, anna::Exception::Mode::Ignore))
addAvp(helpers::base::AVPID__Session_Id)->getUTF8String()->setValue(reqSessionId->getUTF8String()->getValue());
if(reqSessionId)
if(!getAvp(helpers::base::AVPID__Session_Id, 1, anna::Exception::Mode::Ignore))
addAvp(helpers::base::AVPID__Session_Id)->getUTF8String()->setValue(reqSessionId->getUTF8String()->getValue());
engine->releaseMessage(message);
}
else {
engine->releaseMessage(message);
}
else {
- LOGWARNING(anna::Logger::warning("Cannot release a message for which i don't know the codec engine (check the registered stack id regarding the message application id) !", ANNA_FILE_LOCATION));
+ LOGWARNING(anna::Logger::warning("Cannot release a message for which I don't know the codec engine (check the registered stack id regarding the message application id) !", ANNA_FILE_LOCATION));