Message cleared on demand (if you want to reuse and the codec engine may be different)
[anna.git] / example / diameter / batchConverter / main.cpp
index 5ccf1c8..f909d89 100644 (file)
@@ -70,6 +70,7 @@ void _exit(const std::string &message, int resultCode = 1) {
 // Decodes a diameter message coming from a datablock
 void decodeDataBlock(const anna::DataBlock &db/*, unsigned int & detectedApplicationId*/) throw() {
   try {
+    G_codecMsg.clear(); // perhaps we will need another codec engine ...
     G_codecMsg.decode(db);
   } catch(RuntimeException &ex) {
     _exit(ex.asString());