aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Server/AuthSession.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-07-15 20:24:37 +0200
committerShauren <shauren.trinity@gmail.com>2025-07-15 20:24:37 +0200
commit13f18733b8e82aa5502b68d3c47614f4d38c0bee (patch)
tree706daad296041ce2eda29ded2797ad4e2daf4413 /src/server/authserver/Server/AuthSession.h
parent9ffc85485a2404651d9b8a40b69fb06d4161b1ee (diff)
Core/Authserver: Refactor auth cmd handler table to avoid msvc compiler bug that initializes half of it to garbage as of version 19.44.35211
Diffstat (limited to 'src/server/authserver/Server/AuthSession.h')
-rw-r--r--src/server/authserver/Server/AuthSession.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/server/authserver/Server/AuthSession.h b/src/server/authserver/Server/AuthSession.h
index 06c1b79bf3e..d1063f0d493 100644
--- a/src/server/authserver/Server/AuthSession.h
+++ b/src/server/authserver/Server/AuthSession.h
@@ -30,8 +30,8 @@
using boost::asio::ip::tcp;
+class AuthHandlerTable;
class ByteBuffer;
-struct AuthHandler;
enum eAuthCmd : uint8;
enum AuthStatus
@@ -41,6 +41,7 @@ enum AuthStatus
STATUS_RECONNECT_PROOF,
STATUS_AUTHED,
STATUS_WAITING_FOR_REALM_LIST,
+ STATUS_XFER,
STATUS_CLOSED
};
@@ -64,8 +65,6 @@ class AuthSession : public Socket<AuthSession>
typedef Socket<AuthSession> AuthSocket;
public:
- static consteval std::array<AuthHandler, 10> InitHandlers();
-
AuthSession(tcp::socket&& socket);
void Start() override;
@@ -77,11 +76,15 @@ protected:
void ReadHandler() override;
private:
+ friend AuthHandlerTable;
bool HandleLogonChallenge();
bool HandleLogonProof();
bool HandleReconnectChallenge();
bool HandleReconnectProof();
bool HandleRealmList();
+ bool HandleXferAccept();
+ bool HandleXferResume();
+ bool HandleXferCancel();
void CheckIpCallback(PreparedQueryResult result);
void LogonChallengeCallback(PreparedQueryResult result);
@@ -107,12 +110,4 @@ private:
QueryCallbackProcessor _queryProcessor;
};
-struct AuthHandler
-{
- eAuthCmd cmd;
- AuthStatus status;
- size_t packetSize;
- bool (AuthSession::*handler)();
-};
-
#endif