// Decodes a diameter message coming from a datablock
void decodeDataBlock(const anna::DataBlock &db/*, unsigned int & detectedApplicationId*/) throw() {
try {
+ G_codecMsg.clear(); // perhaps we will need another codec engine ...
G_codecMsg.decode(db);
} catch(RuntimeException &ex) {
_exit(ex.asString());
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
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).
//------------------------------------------------------------------------------
//------------------------------------------------------------- Message::setId()
//------------------------------------------------------------------------------
-void Message::setId(CommandId id, bool _clear) throw(anna::RuntimeException) {
- // Clear class content:
- if(_clear) clear();
+void Message::setId(CommandId id) throw(anna::RuntimeException) {
// Id assignment:
a_id = id;
throw anna::RuntimeException(msg, ANNA_FILE_LOCATION);
}
- setId(stackCommand->getId(), false /* don't clear */);
+ setId(stackCommand->getId());
+
// 'P', 'E' and 'T' flags:
bool activateP = pbit ? (pbit->getValue() == "yes") : false;
bool activateE = ebit ? (ebit->getValue() == "yes") : false;
using namespace anna::diameter::codec::tme;
-
-////------------------------------------------------------------------------------
-////------------------------------------------------------------------- Avp::Avp()
-////------------------------------------------------------------------------------
-//Avp::Avp(Engine *engine) : anna::diameter::codec::Avp(engine) {
-// initialize();
-//}
-//
-////------------------------------------------------------------------------------
-////------------------------------------------------------------------- Avp::Avp()
-////------------------------------------------------------------------------------
-//Avp::Avp(AvpId id, Engine *engine)/* : anna::diameter::codec::Avp(id, engine)*/ {
-// initialize();
-// setId(id);
-//}
-
//------------------------------------------------------------------------------
//------------------------------------------------------------------ Avp::~Avp()
//------------------------------------------------------------------------------