From 542be3f895fd4391da8d2c63e0339e68743bb727 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:15:53 +0800 Subject: [PATCH] [raknet] Match `PacketLogger::BaseIDTOString(...)` --- raknet/PacketLogger.cpp | 89 +---------------------------------------- 1 file changed, 1 insertion(+), 88 deletions(-) diff --git a/raknet/PacketLogger.cpp b/raknet/PacketLogger.cpp index 2a490e6..fe0af3a 100644 --- a/raknet/PacketLogger.cpp +++ b/raknet/PacketLogger.cpp @@ -208,94 +208,7 @@ void PacketLogger::SetPrintAcks(bool print) } char* PacketLogger::BaseIDTOString(unsigned char Id) { - if (Id >= ID_RESERVED9) - return 0; - - const char *IDTable[(int)ID_RESERVED9]= - { - "ID_INTERNAL_PING", - "ID_PING", - "ID_PING_OPEN_CONNECTIONS", - "ID_CONNECTED_PONG", - "ID_REQUEST_STATIC_DATA", - "ID_CONNECTION_REQUEST", - "ID_SECURED_CONNECTION_RESPONSE", - "ID_SECURED_CONNECTION_CONFIRMATION", - "ID_RPC_MAPPING", - "ID_DETECT_LOST_CONNECTIONS", - "ID_OPEN_CONNECTION_REQUEST", - "ID_OPEN_CONNECTION_REPLY", - "ID_RPC", - "ID_RPC_REPLY", - "ID_BROADCAST_PINGS", - "ID_SET_RANDOM_NUMBER_SEED", - "ID_CONNECTION_REQUEST_ACCEPTED", - "ID_CONNECTION_ATTEMPT_FAILED", - "ID_NEW_INCOMING_CONNECTION", - "ID_NO_FREE_INCOMING_CONNECTIONS", - "ID_DISCONNECTION_NOTIFICATION", - "ID_CONNECTION_LOST", - "ID_RSA_PUBLIC_KEY_MISMATCH", - "ID_CONNECTION_BANNED", - "ID_INVALID_PASSWORD", - "ID_MODIFIED_PACKET", - "ID_TIMESTAMP", - "ID_PONG", - "ID_RECEIVED_STATIC_DATA", - "ID_REMOTE_DISCONNECTION_NOTIFICATION", - "ID_REMOTE_CONNECTION_LOST", - "ID_REMOTE_NEW_INCOMING_CONNECTION", - "ID_REMOTE_EXISTING_CONNECTION", - "ID_REMOTE_STATIC_DATA", - "ID_FILE_LIST_TRANSFER_HEADER", - "ID_FILE_LIST_TRANSFER_FILE", - "ID_DDT_DOWNLOAD_REQUEST", - "ID_QUERY_MASTER_SERVER", - "ID_MASTER_SERVER_DELIST_SERVER", - "ID_MASTER_SERVER_UPDATE_SERVER", - "ID_MASTER_SERVER_SET_SERVER", - "ID_RELAYED_CONNECTION_NOTIFICATION", - "ID_ADVERTISE_SYSTEM", - "ID_TRANSPORT_STRING", - "ID_REPLICA_MANAGER_CONSTRUCTION", - "ID_REPLICA_MANAGER_DESTRUCTION", - "ID_REPLICA_MANAGER_SCOPE_CHANGE", - "ID_REPLICA_MANAGER_SERIALIZE", - "ID_REPLICA_MANAGER_DOWNLOAD_COMPLETE", - "ID_CONNECTION_GRAPH_REQUEST", - "ID_CONNECTION_GRAPH_REPLY", - "ID_CONNECTION_GRAPH_UPDATE", - "ID_CONNECTION_GRAPH_NEW_CONNECTION", - "ID_CONNECTION_GRAPH_CONNECTION_LOST", - "ID_CONNECTION_GRAPH_DISCONNECTION_NOTIFICATION", - "ID_ROUTE_AND_MULTICAST", - "ID_RAKVOICE_OPEN_CHANNEL_REQUEST", - "ID_RAKVOICE_OPEN_CHANNEL_REPLY", - "ID_RAKVOICE_CLOSE_CHANNEL", - "ID_RAKVOICE_DATA", - "ID_AUTOPATCHER_GET_CHANGELIST_SINCE_DATE", - "ID_AUTOPATCHER_CREATION_LIST", - "ID_AUTOPATCHER_DELETION_LIST", - "ID_AUTOPATCHER_GET_PATCH", - "ID_AUTOPATCHER_PATCH_LIST", - "ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR", - "ID_AUTOPATCHER_FINISHED", - "ID_AUTOPATCHER_RESTART_APPLICATION", - "ID_NAT_PUNCHTHROUGH_REQUEST", - "ID_NAT_TARGET_NOT_CONNECTED", - "ID_NAT_TARGET_CONNECTION_LOST", - "ID_NAT_CONNECT_AT_TIME", - "ID_NAT_SEND_OFFLINE_MESSAGE_AT_TIME", - "ID_DATABASE_QUERY_REQUEST", - "ID_DATABASE_UPDATE_ROW", - "ID_DATABASE_REMOVE_ROW", - "ID_DATABASE_QUERY_REPLY", - "ID_DATABASE_UNKNOWN_TABLE", - "ID_DATABASE_INCORRECT_PASSWORD", - - }; - - return (char*)IDTable[Id]; + return 0; } #ifdef _MSC_VER #pragma warning( disable : 4100 ) // warning C4100: : unreferenced formal parameter