chore(net): clean up command handler result comments

This commit is contained in:
fallenoak 2025-09-25 18:49:24 -07:00
parent c7f9df77f1
commit cb48aca869
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -69,7 +69,8 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
msg.Get(result); msg.Get(result);
// Auth failure (success == 0) // Auth challenge failure (result != 0)
if (result != 0) { if (result != 0) {
if (!msg.IsValid()) { if (!msg.IsValid()) {
return 1; return 1;
@ -86,6 +87,8 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
return 2; return 2;
} }
// Auth challenge success (result == 0)
uint8_t* serverPublicKey; uint8_t* serverPublicKey;
uint8_t generatorLen; uint8_t generatorLen;
@ -253,7 +256,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
uint8_t result; uint8_t result;
msg.Get(result); msg.Get(result);
// Authentication failure (result for success is 0) // Auth proof failure (result != 0)
if (result != 0) { if (result != 0) {
if (result == 4) { if (result == 4) {
@ -275,7 +278,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
return 2; return 2;
} }
// Authentication success // Auth proof success (result == 0)
uint8_t* serverProof; uint8_t* serverProof;
uint32_t accountFlags = 0x0; uint32_t accountFlags = 0x0;
@ -340,13 +343,13 @@ int32_t Grunt::ClientLink::CmdAuthReconnectChallenge(CDataStore& msg) {
msg.Get(result); msg.Get(result);
// Reconnect auth failure (result != 0) // Reconnect challenge failure (result != 0)
if (result != 0) { if (result != 0) {
return 1; return 1;
} }
// Reconnect auth success (result == 0) // Reconnect challenge success (result == 0)
msg.GetDataInSitu(reinterpret_cast<void*&>(reconnectKey), RECONNECT_KEY_LEN); msg.GetDataInSitu(reinterpret_cast<void*&>(reconnectKey), RECONNECT_KEY_LEN);
msg.GetDataInSitu(reinterpret_cast<void*&>(versionChallenge), VERSION_CHALLENGE_LEN); msg.GetDataInSitu(reinterpret_cast<void*&>(versionChallenge), VERSION_CHALLENGE_LEN);