Fixes and improvs. Basic DRA feature.
[anna.git] / source / diameter.comm / ServerSession.cpp
index 1e2728c..ad0b15a 100644 (file)
@@ -55,7 +55,7 @@ const anna::Millisecond ServerSession::DefaultAllowedInactivityTime(90000); // I
 ServerSession::ServerSession() : Session("diameter::comm::ServerSession", "Diameter Inactivity Detection Timer"),
   a_receiverFactory(this),
   a_cer(ClassCode::Bind),
-  a_dwr(ClassCode::ApplicationMessage) // realmente no es necesario, los Message son por defecto de aplicacion
+  a_dwr(ClassCode::ApplicationMessage) // not actually needed; Message is application type by default
 { initialize(); }
 
 void ServerSession::initialize() throw() {
@@ -81,7 +81,6 @@ int ServerSession::getPort() const throw() {
   return a_parent->getKey().second;
 }
 
-
 const Response* ServerSession::send(const Message* message) throw(anna::RuntimeException) {
   LOGMETHOD(anna::TraceMethod traceMethod(a_className, "send", ANNA_FILE_LOCATION));
 
@@ -398,6 +397,9 @@ throw(anna::RuntimeException) {
       }
 
       a_cer.setBody(db);
+      // Basic DRA:
+      getParent()->getEngine()->manageDrDhServerSession(this, true /* register */);
+
       sendCEA();
       //activateTimer(); // Ya se invoca al inicio de este metodo ::receive
       //bool changes = a_parent->refreshAvailability();