summaryrefslogtreecommitdiff
path: root/src/common/manaserv_protocol.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2023-05-26 13:03:23 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2023-05-26 13:03:26 +0200
commit98dd12a2ccf16d9889b9a97b8ddf6ad64011f9c4 (patch)
treefdfb2f681212ccbb97074baa5f512b9127529046 /src/common/manaserv_protocol.h
parent1f7c7fa192907d90a0ef6bbfbfe770a1e2fffa08 (diff)
downloadmanaserv-98dd12a2ccf16d9889b9a97b8ddf6ad64011f9c4.tar.gz
manaserv-98dd12a2ccf16d9889b9a97b8ddf6ad64011f9c4.tar.bz2
manaserv-98dd12a2ccf16d9889b9a97b8ddf6ad64011f9c4.tar.xz
manaserv-98dd12a2ccf16d9889b9a97b8ddf6ad64011f9c4.zip
Fixed login in case an account gets two pending tokens assignedHEADmaster
Not entirely sure if this is what was happening, but if a PAMSG_LOGIN_RNDTRGR was handled, a new pending account was always created and appended to mPendingAccounts. However, when handling the follow-up PAMSG_LOGIN, only the first pending account with matching username was checked, which could result in a failed login due to mismatching token. Resolved this issue by unifying the client-specific random token with the Stellar token stored on the AccountClient. This means the username value in PAMSG_LOGIN_RNDTRGR could be removed. Eventually it would also be nice to simplify this further such that the token is automatically sent to the client after connecting rather than being something that needs to be requested.
Diffstat (limited to 'src/common/manaserv_protocol.h')
-rw-r--r--src/common/manaserv_protocol.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/manaserv_protocol.h b/src/common/manaserv_protocol.h
index 9bb50337..67e812ac 100644
--- a/src/common/manaserv_protocol.h
+++ b/src/common/manaserv_protocol.h
@@ -77,7 +77,7 @@ enum {
APMSG_LOGIN_RESPONSE = 0x0012, // B error, S updatehost, S Client data URL, B Character slots, {content of APMSG_CHAR_CREATE_RESPONSE (without error code)}*
PAMSG_LOGOUT = 0x0013, // -
APMSG_LOGOUT_RESPONSE = 0x0014, // B error
- PAMSG_LOGIN_RNDTRGR = 0x0015, // S username
+ PAMSG_LOGIN_RNDTRGR = 0x0015, // -
APMSG_LOGIN_RNDTRGR_RESPONSE = 0x0016, // S random seed
PAMSG_STELLAR_LOGIN = 0x0017, // D version
APMSG_STELLAR_LOGIN_RESPONSE = 0x0018, // B error, S token, S url