X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter.comm%2FSession.cpp;h=778a834f572d5d3e2fa17d912374dcd3104197af;hb=61c8b6e85a24b5b6b9e9bc40dbeda77726e57283;hp=051cbce3f7e8b5923f10a6d860934536e329e306;hpb=129af2a9a7c287843be5bd443c5b1ad9b08438a8;p=anna.git diff --git a/source/diameter.comm/Session.cpp b/source/diameter.comm/Session.cpp index 051cbce..778a834 100644 --- a/source/diameter.comm/Session.cpp +++ b/source/diameter.comm/Session.cpp @@ -109,7 +109,7 @@ void Session::initializeSequences() throw() { // affect any state that was set when the original request was // processed. Duplicate answer messages that are to be locally // consumed (see Section 6.2) SHOULD be silently discarded. - srand(::time(NULL) + anna::functions::exclusiveHash(anna::functions::asString("%s:%d|%d", getAddress().c_str(), getPort(), a_socketId))); + srand(::time(NULL) + anna::functions::hash(anna::functions::asString("%s:%d|%d", getAddress().c_str(), getPort(), a_socketId).c_str())); a_nextHopByHop = rand(); a_nextEndToEnd = ((::time(NULL) & 0xFFF) << 20) + (rand() & 0xFFFFF); } @@ -240,7 +240,6 @@ throw() { bool doUnbind = false; bool doRetransmission = false; - // Quitar el OnExpiry: no tiene sentido habiendo keep-alive (DWR) if(response->getClassCode() != ClassCode::Bind) { if(response->getRequest()->getOnExpiry() == Message::OnExpiry::Abandon) { a_onDisconnect = OnDisconnect::IgnorePendings; // Abandon is not graceful @@ -270,19 +269,18 @@ throw() { if(doRetransmission) { diameter::comm::Message *request = const_cast(response->getRequest()); - eventRequestRetransmission(request); - int retries = request->getRetries(); if (retries > 0) { retries--; request->setRetries(retries); LOGDEBUG ( - //std::string msg(asString()); - std::string msg = anna::functions::asString("Retransmission initiated for request with HopByHop: %u; remaining %d retries", response->getHopByHop(), retries); + std::string msg(asString()); + msg += anna::functions::asString(" | Retransmission initiated for request with HopByHop: %u; remaining %d retries", response->getHopByHop(), retries); anna::Logger::debug(msg, ANNA_FILE_LOCATION); ); diameter::codec::functions::setPotentiallyReTransmittedMessageBit(*request); + eventRequestRetransmission(request); send(request); } } @@ -498,4 +496,3 @@ void Session::updateOutgoingActivityTime(void) throw() { anna::Logger::debug(msg, ANNA_FILE_LOCATION); ); } -