- anna::diameter::codec::EngineManager &em = anna::diameter::codec::EngineManager::instantiate();
- anna::diameter::codec::Message *message = *(it->second->begin());
- em.getCodecEngine(message->getApplicationId())->releaseMessage(message);
+ engine = anna::diameter::codec::EngineManager::instantiate().getCodecEngine(message->getApplicationId());
+ if (engine) {
+ 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));
+ return;
+ }