Remove temporary
[anna.git] / source / diameter / codec / EngineImpl.cpp
index d9a6146..c25bec0 100644 (file)
@@ -116,6 +116,7 @@ EngineImpl::EngineImpl(const char* className) :
   a_dictionary(NULL),
   a_validationDepth(ValidationDepth::FirstError),
   a_validationMode(ValidationMode::AfterDecoding),
+  a_singleFailedAVP(true),
   a_ignoreFlags(false),
   a_selectStackWithApplicationId(false),
   a_fixMode(FixMode::BeforeEncoding) {
@@ -144,6 +145,9 @@ Avp* EngineImpl::createAvp(const AvpId *id) throw(anna::RuntimeException) {
   if((result = allocateAvp()) == NULL)
     throw anna::RuntimeException("diameter::codec::EngineImpl::allocateAvp returns NULL", ANNA_FILE_LOCATION);
 
+  // Sets engine
+  result->setEngine((Engine*)this);
+
   //result->clear(); better clear this at releaseAvp(), see class-help implementation example
   if(id) result->setId(*id);
 
@@ -161,6 +165,9 @@ Message* EngineImpl::createMessage(const CommandId *id) throw(anna::RuntimeExcep
   if((result = allocateMessage()) == NULL)
     throw anna::RuntimeException("diameter::codec::EngineImpl::allocateMessage returns NULL", ANNA_FILE_LOCATION);
 
+  // Sets engine
+  result->setEngine((Engine*)this);
+
   //result->clear(); better clear this at releaseMessage(), see class-help implementation example
   if(id) result->setId(*id);
 
@@ -185,6 +192,8 @@ std::string EngineImpl::asString(void) const throw() {
   result += asText(a_validationDepth);
   result += "\nValidationMode: ";
   result += asText(a_validationMode);
+  result += "\nSingle Failed-AVP: ";
+  result += a_singleFailedAVP ? "yes" : "no";
   result += "\nIgnore flags: ";
   result += a_ignoreFlags ? "yes" : "no";
   result += "\nFixMode: ";
@@ -203,6 +212,7 @@ throw() {
   anna::xml::Node* result = parent->createChild("diameter.codec.EngineImpl");
   result->createAttribute("ValidationDepth", asText(a_validationDepth));
   result->createAttribute("ValidationMode", asText(a_validationMode));
+  result->createAttribute("SingleFailedAVP", a_singleFailedAVP ? "yes" : "no");
   result->createAttribute("IgnoreFlags", a_ignoreFlags ? "yes" : "no");
   result->createAttribute("FixMode", asText(a_fixMode));
   anna::xml::Node* dictionary = result->createChild("EngineImpl.ActivatedDictionary");