Message cleared on demand (if you want to reuse and the codec engine may be different)
[anna.git] / include / anna / diameter / codec / Message.hpp
index 69aecf2..4c3e6e6 100644 (file)
@@ -232,9 +232,8 @@ public:
      Sets the command identifier and clear the former content.
 
      @param id Command identifier as pair (code,request-indicator).
-     @param _clear Message will be cleared when updating the command identifier (default behaviour).
   */
-  void setId(CommandId id, bool _clear = true) throw(anna::RuntimeException);
+  void setId(CommandId id) throw(anna::RuntimeException);
 
   /**
      Same as #setId but providing dictionary logical name for Avp searched
@@ -317,7 +316,7 @@ public:
 
     a_engine = request.getEngine(); // we know this will be
 
-    setId(CommandId(request.getId().first, !request.getId().second), false /* don't clear */);
+    setId(CommandId(request.getId().first, !request.getId().second));
     setVersion(request.getVersion());
     setApplicationId(request.getApplicationId());
     setHopByHop(request.getHopByHop()); // The same Hop-by-Hop Identifier in the request is used in the answer (RFC 6733 Section 6.2).