if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_AVP_UNSUPPORTED);
- answer->setNewFailedAvp((Avp*)this);
+ answer->setFailedAvp((Avp*)this);
}
}
if((size % 4) != 0) {
oamModule.activateAlarm(OamModule::Alarm::AvpDecode__IncorrectLength);
oamModule.count(OamModule::Counter::AvpDecode__IncorrectLength);
+
+ if(answer) {
+ answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_INVALID_AVP_LENGTH);
+ //answer->setFailedAvp(a_id);
+ }
+
throw anna::RuntimeException("Avp format error, the avp length is incorrect (must be multiple of 4 on grouped type)", ANNA_FILE_LOCATION);
}
if(db.getSize() < HeaderLengthVinactive) {
oamModule.activateAlarm(OamModule::Alarm::AvpDecode__NotEnoughBytesToCoverAvpHeaderLength);
oamModule.count(OamModule::Counter::AvpDecode__NotEnoughBytesToCoverAvpHeaderLength);
- // DIAMETER_INVALID_AVP_LENGTH; // no podré construir un avp fiable, así que no registro el result-code
+ // DIAMETER_INVALID_AVP_LENGTH; // no podr� construir un avp fiable, as� que no registro el result-code
throw anna::RuntimeException("Not enough bytes to cover avp header length", ANNA_FILE_LOCATION);
}
if(db.getSize() < HeaderLengthVactive) {
oamModule.activateAlarm(OamModule::Alarm::AvpDecode__NotEnoughBytesToCoverAvpHeaderLength);
oamModule.count(OamModule::Counter::AvpDecode__NotEnoughBytesToCoverAvpHeaderLength);
- // DIAMETER_INVALID_AVP_LENGTH; // no podré construir un avp fiable, así que no registro el result-code
+ // DIAMETER_INVALID_AVP_LENGTH; // no podr� construir un avp fiable, as� que no registro el result-code
throw anna::RuntimeException(anna::functions::asString("Not enough bytes to cover avp header length (avp code = %u)", code), ANNA_FILE_LOCATION);
}
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_INVALID_AVP_LENGTH);
- answer->setNewFailedAvp(a_id);
+ //answer->setFailedAvp(a_id);
}
throw anna::RuntimeException(anna::functions::asString("Avp format error, the avp length is incorrect (avp code = %u)", code), ANNA_FILE_LOCATION);
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_INVALID_AVP_VALUE); // unspecified error ...
- answer->setNewFailedAvp((Avp*)this);
+ //answer->setFailedAvp((Avp*)this);
}
throw anna::RuntimeException(anna::functions::asString("Internal Avp decoding error (avp code = %u): %s", code, ex.getText().c_str()), ANNA_FILE_LOCATION);
}
if(!stackFormat || !stackFormat->isGrouped()) {
- //LOGDEBUG(anna::Logger::debug("Avp is not grouped. Nothing fix.", ANNA_FILE_LOCATION));
+ //LOGDEBUG(anna::Logger::debug("Avp is not grouped. Nothing to fix.", ANNA_FILE_LOCATION));
return;
}
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_MISSING_AVP);
- answer->setNewFailedAvp((*rule_it).second.getId());
+ answer->setFailedAvp((*rule_it).second.getId());
}
engine->validationAnomaly(anna::functions::asString("Missing fixed rule %s inside %s", STRING_WITH_QUOTATION_MARKS__C_STR((*rule_it).second.asString(false /*ommit dots & pair*/)), STRING_WITH_QUOTATION_MARKS__C_STR(parentDescription)));
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_MISSING_AVP);
- answer->setNewFailedAvp(id);
+ answer->setFailedAvp(id);
}
} else {
oamModule.count(OamModule::Counter::LevelValidation__FailedRuleForCardinalityMoreThanNeeded);
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_AVP_OCCURS_TOO_MANY_TIMES);
- answer->setNewFailedAvp((Avp*)firstAvp(avps, id) /* first instance */);
+ answer->setFailedAvp((Avp*)firstAvp(avps, id) /* first instance */);
}
}
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_AVP_NOT_ALLOWED);
- //answer->setNewFailedAvp((Avp*)firstAvp(avps, id) /* first instance */); // NO SENSE... what to put ?
+ //answer->setFailedAvp((Avp*)firstAvp(avps, id) /* first instance */); // NO SENSE... what to put ?
}
engine->validationAnomaly(anna::functions::asString("Failed Generic AVP rule %s for cardinality (found %d disregarded items inside %s)", STRING_WITH_QUOTATION_MARKS__C_STR((*generic_rule_it).second.asString(false /*ommit dots & pair*/)), amount, STRING_WITH_QUOTATION_MARKS__C_STR(parentDescription)));
// We wouldn't know where are these disregarded, but...
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_AVP_NOT_ALLOWED);
- answer->setNewFailedAvp((Avp*)firstAvp(avps, id) /* first instance */);
+ answer->setFailedAvp((Avp*)firstAvp(avps, id) /* first instance */);
}
}
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_INVALID_AVP_BITS);
- //answer->setNewFailedAvp((Avp*)this); RFC 6733 says nothing about Failed-AVP in this case...
+ answer->setFailedAvp((Avp*)this); // RFC 6733 says nothing about Failed-AVP in this case...
}
getEngine()->validationAnomaly(anna::functions::asString("The AVP %s flags (%d) does not fulfill the defined flag rules: %s", STRING_WITH_QUOTATION_MARKS__C_STR(me), (int)a_flags, STRING_WITH_QUOTATION_MARKS__C_STR(stackAvp->getFlagRulesDescription())));
if(answer) {
answer->setResultCode(helpers::base::AVPVALUES__Result_Code::DIAMETER_INVALID_AVP_VALUE);
- answer->setNewFailedAvp((Avp*)this);
+ answer->setFailedAvp((Avp*)this);
}
getEngine()->validationAnomaly(anna::functions::asString("Enumerated AVP %s with value %d does not comply to restriction: %s", STRING_WITH_QUOTATION_MARKS__C_STR(me), a_Enumerated->getValue(), stackAvp->getEnums()));