Convert to warning
[anna.git] / source / diameter.comm / Message.cpp
index b8ae723..a07de1a 100644 (file)
@@ -27,7 +27,7 @@ using namespace anna::diameter::comm;
 
 const char* Message::asText(const OnExpiry::_v rc)
 throw() {
-  static const char* text [] = { "Abandon", "Ignore" };
+  static const char* text [] = { "Abandon", "Ignore", "Retransmit" };
   return text [rc];
 }
 
@@ -61,7 +61,8 @@ throw() {
 ////   a_onExpiry = OnExpiry::Ignore;
 //}
 
-bool Message::fixRequestSequence(HopByHop hbh, EndToEnd ete, bool freezeEndToEnd) throw() {
+
+bool Message::fixRequestSequence(HopByHop hbh, EndToEnd ete) throw() {
   setRequestHopByHop(getHopByHop()); // original request hop-by-hop (backup)
   setRequestEndToEnd(getEndToEnd()); // original request end-to-end (backup)
   bool result = false;
@@ -71,7 +72,7 @@ bool Message::fixRequestSequence(HopByHop hbh, EndToEnd ete, bool freezeEndToEnd
     result = true;
   }
 
-  if(!freezeEndToEnd) {
+  if(a_endToEndSequenced) {
     if(ete != getRequestEndToEnd()) {
       codec::functions::setEndToEnd((anna::DataBlock&)getBody(), ete);
       result = true;
@@ -85,7 +86,7 @@ bool Message::fixRequestSequence(HopByHop hbh, EndToEnd ete, bool freezeEndToEnd
     msg += " (original) -> ";
     msg += anna::functions::asString(hbh);
     msg += " (session)";
-    msg += freezeEndToEnd ? " | End to end [freezed]: " : " | End to end: ";
+    msg += a_endToEndSequenced ? " | End to end: " : " | End to end [end-to-end unchanged]: ";
     msg += anna::functions::asString(getRequestEndToEnd());
     msg += " (original) -> ";
     msg += anna::functions::asString(ete);
@@ -143,6 +144,11 @@ anna::diameter::CommandId Message::getCommandId(bool &isRequest) const throw() {
   return result;
 }
 
+anna::diameter::ApplicationId Message::getApplicationId() const throw() {
+  diameter::ApplicationId result = diameter::codec::functions::getApplicationId(getBody());
+  return result;
+}
+
 HopByHop Message::getHopByHop() const throw() {
   return (diameter::codec::functions::getHopByHop(getBody()));
 }