From 7d03daec7ddfd7dfd568fc6f1e81f5fafed14f5e Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 17 Apr 2016 04:42:28 +0000 Subject: [PATCH] remove more dead code --- .../src/shared/ClientConnection.cpp | 37 +++---------------- .../src/shared/ConfigConnectionServer.h | 10 ----- .../src/shared/ConnectionServer.cpp | 6 --- 3 files changed, 6 insertions(+), 47 deletions(-) diff --git a/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp b/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp index 32b3811c..3086085e 100755 --- a/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp +++ b/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp @@ -330,15 +330,7 @@ void ClientConnection::handleClientIdMessage(const ClientIdMsg& msg) Archive::ReadIterator ri(t); KeyShare::Token token(ri); - if (!ConfigConnectionServer::getValidateStationKey()) - { - // get SUID from token - result = ConnectionServer::decryptToken(token, m_suid, m_isSecure, m_accountName); - } - else - { - result = ConnectionServer::decryptToken(token, sessionId, m_requestedSuid); - } + result = ConnectionServer::decryptToken(token, sessionId, m_requestedSuid); static const std::string loginTrace("TRACE_LOGIN"); LOG(loginTrace, ("ClientConnection SUID = %d", m_suid)); @@ -378,30 +370,13 @@ void ClientConnection::handleClientIdMessage(const ClientIdMsg& msg) return; } - if (ConfigConnectionServer::getValidateStationKey()) + m_suid = atoi(m_accountName.c_str()); + if (m_suid == 0) { - SessionApiClient * session = ConnectionServer::getSessionApiClient(); - NOT_NULL(session); - if(session) - { - session->validateClient(this, sessionId); - } - else - { - ConnectionServer::dropClient(this, "SessionApiClient is not available!"); - disconnect(); - } - } - else - { - m_suid = atoi(m_accountName.c_str()); - if (m_suid == 0) - { - std::hash h; - m_suid = h(m_accountName.c_str()); - } - onValidateClient(m_suid, m_accountName, m_isSecure, nullptr, ConfigConnectionServer::getDefaultGameFeatures(), ConfigConnectionServer::getDefaultSubscriptionFeatures(), 0, 0, 0, 0, ConfigConnectionServer::getFakeBuddyPoints()); + std::hash h; + m_suid = h(m_accountName.c_str()); } + onValidateClient(m_suid, m_accountName, m_isSecure, nullptr, ConfigConnectionServer::getDefaultGameFeatures(), ConfigConnectionServer::getDefaultSubscriptionFeatures(), 0, 0, 0, 0, ConfigConnectionServer::getFakeBuddyPoints()); } else { diff --git a/engine/server/application/ConnectionServer/src/shared/ConfigConnectionServer.h b/engine/server/application/ConnectionServer/src/shared/ConfigConnectionServer.h index 46f67d1e..e3634b88 100755 --- a/engine/server/application/ConnectionServer/src/shared/ConfigConnectionServer.h +++ b/engine/server/application/ConnectionServer/src/shared/ConfigConnectionServer.h @@ -104,7 +104,6 @@ public: static const int getClientHashTableSize (); static const int getLagReportThreshold (); - static bool getValidateStationKey(); static const char * getSessionServers(); static const int getSessionType(); static bool getDisableSessionLogout(); @@ -349,15 +348,6 @@ inline const int ConfigConnectionServer::getLagReportThreshold() // ---------------------------------------------------------------------- -//------------------------------------------------------------------------------------------ - -inline bool ConfigConnectionServer::getValidateStationKey() -{ - return data->validateStationKey; -} - -//------------------------------------------------------------------------------------------ - inline const char * ConfigConnectionServer::getSessionServers() { return data->sessionServers; diff --git a/engine/server/application/ConnectionServer/src/shared/ConnectionServer.cpp b/engine/server/application/ConnectionServer/src/shared/ConnectionServer.cpp index 10d0c99f..d2a7f565 100755 --- a/engine/server/application/ConnectionServer/src/shared/ConnectionServer.cpp +++ b/engine/server/application/ConnectionServer/src/shared/ConnectionServer.cpp @@ -119,12 +119,6 @@ m_recoveringClientList() Address a("", ConfigConnectionServer::getPingPort()); IGNORE_RETURN(pingSocket->bind (a)); - - if (ConfigConnectionServer::getValidateStationKey()) - { - installSessionValidation(); - } - } //-----------------------------------------------------------------------