Fix retransmission issues (order, tracing, etc.)
[anna.git] / source / diameter.comm / Entity.cpp
index 25a879c..17c1ebf 100644 (file)
@@ -90,10 +90,11 @@ int Entity::readSocketId(const Message* message, int maxClientSessions) const th
       anna::diameter::helpers::base::functions::decodeSessionId(sid, diameterIdentity, high, low /* context-teid */, optional);
       return (low % maxClientSessions);
     }
-    //case anna::diameter::helpers::dcca::ChargingContext::SMS:
-    //case anna::diameter::helpers::dcca::ChargingContext::MMS:
-    //default:
-    //   return -1; // IEC model and Unknown traffic types
+    case anna::diameter::helpers::dcca::ChargingContext::SMS:
+    case anna::diameter::helpers::dcca::ChargingContext::MMS:
+    case anna::diameter::helpers::dcca::ChargingContext::Unknown:
+    default:
+       return -1; // IEC model and Unknown traffic types
     }
   } catch(anna::RuntimeException &ex) {
     LOGDEBUG(
@@ -323,7 +324,11 @@ void Entity::eventPeerShutdown(const ClientSession* clientSession) throw() {
 void Entity::eventRequestRetransmission(const ClientSession* clientSession, Message *request) throw() {
   LOGWARNING(
     std::string msg(clientSession->asString());
-    msg += " | eventRequestRetransmission";
+
+    HopByHop hopByHop = codec::functions::getHopByHop(request->getBody()); // context identification
+    int retries = request->getRetries();
+
+    msg += anna::functions::asString(" | eventRequestRetransmission: request with application HopByHop: %u; remaining %d retries", hopByHop, retries);
     anna::Logger::warning(msg, ANNA_FILE_LOCATION);
   );
 }