void ProgrammedAnswers::clear () throw() {
for (reacting_answers_const_iterator it = a_deques.begin(); it != a_deques.end(); it++) {
- anna::diameter::codec::Engine *engine = anna::functions::component <Engine> (ANNA_FILE_LOCATION);
- engine->releaseMessage(*(it->second->begin()));
+ a_codecEngine->releaseMessage(*(it->second->begin()));
delete(it->second);
}
a_deques.clear();
}
void ProgrammedAnswers::addMessage(int code, anna::diameter::codec::Message *message) throw() {
+ if (!message) return; // just in case
+ message->setEngine(a_codecEngine); // just in case
+
reacting_answers_const_iterator it = a_deques.find(code);
if (it != a_deques.end()) {
it->second->push_back(message);
reacting_answers_const_iterator it = a_deques.find(code);
if (it != a_deques.end()) {
if (!it->second->empty()) {
- anna::diameter::codec::Engine *engine = anna::functions::component <Engine> (ANNA_FILE_LOCATION);
if (a_rotate) {
addMessage(code, *(it->second->begin()));
}
else {
- engine->releaseMessage(*(it->second->begin()));
+ a_codecEngine->releaseMessage(*(it->second->begin()));
}
it->second->pop_front();
}
aux += "', Rotation ";
aux += a_rotate ? "enabled":"disabled";
result += anna::functions::highlightJustify(aux);
+ result += "Codec engine: ";
+ result += a_codecEngine->getClassName();
if(a_deques.size() != 0) {
for(reacting_answers_const_iterator it = a_deques.begin(); it != a_deques.end(); it++) {
if (it->second->size() != 0) {