mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 17:32:45 +01:00
Codechange: make network crypto enum classes
This commit is contained in:
@@ -851,7 +851,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_AUTH_RESPONSE(P
|
||||
if (this->status != ADMIN_STATUS_AUTHENTICATE) return this->SendError(NETWORK_ERROR_NOT_EXPECTED);
|
||||
|
||||
switch (this->authentication_handler->ReceiveResponse(p)) {
|
||||
case NetworkAuthenticationServerHandler::AUTHENTICATED:
|
||||
case NetworkAuthenticationServerHandler::ResponseResult::Authenticated:
|
||||
Debug(net, 3, "[admin] '{}' ({}) authenticated", this->admin_name, this->admin_version);
|
||||
|
||||
this->SendEnableEncryption();
|
||||
@@ -861,11 +861,11 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_AUTH_RESPONSE(P
|
||||
this->authentication_handler = nullptr;
|
||||
return this->SendProtocol();
|
||||
|
||||
case NetworkAuthenticationServerHandler::RETRY_NEXT_METHOD:
|
||||
case NetworkAuthenticationServerHandler::ResponseResult::RetryNextMethod:
|
||||
Debug(net, 6, "[admin] '{}' ({}) authentication failed, trying next method", this->admin_name, this->admin_version);
|
||||
return this->SendAuthRequest();
|
||||
|
||||
case NetworkAuthenticationServerHandler::NOT_AUTHENTICATED:
|
||||
case NetworkAuthenticationServerHandler::ResponseResult::NotAuthenticated:
|
||||
default:
|
||||
Debug(net, 3, "[admin] '{}' ({}) authentication failed", this->admin_name, this->admin_version);
|
||||
return this->SendError(NETWORK_ERROR_WRONG_PASSWORD);
|
||||
|
||||
Reference in New Issue
Block a user