diff options
Diffstat (limited to 'NorthstarDLL/masterserver')
-rw-r--r-- | NorthstarDLL/masterserver/masterserver.cpp | 25 | ||||
-rw-r--r-- | NorthstarDLL/masterserver/masterserver.h | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/NorthstarDLL/masterserver/masterserver.cpp b/NorthstarDLL/masterserver/masterserver.cpp index 8087237c..9b439027 100644 --- a/NorthstarDLL/masterserver/masterserver.cpp +++ b/NorthstarDLL/masterserver/masterserver.cpp @@ -763,6 +763,31 @@ void MasterServerManager::WritePlayerPersistentData(const char* playerId, const requestThread.detach(); } +void MasterServerManager::ProcessConnectionlessPacketSigreq1(std::string data) +{ + rapidjson_document obj; + obj.Parse(data); + + if (obj.HasParseError()) + { + // note: it's okay to print the data as-is since we've already checked that it actually came from Atlas + spdlog::error("invalid Atlas connectionless packet request ({}): {}", data, GetParseError_En(obj.GetParseError())); + return; + } + + if (!obj.HasMember("type") || !obj["type"].IsString()) + { + spdlog::error("invalid Atlas connectionless packet request ({}): missing type", data); + return; + } + + std::string type = obj["type"].GetString(); + + // TODO + + spdlog::error("invalid Atlas connectionless packet request: unknown type {}", type); +} + void ConCommand_ns_fetchservers(const CCommand& args) { g_pMasterServerManager->RequestServerList(); diff --git a/NorthstarDLL/masterserver/masterserver.h b/NorthstarDLL/masterserver/masterserver.h index 21082e2f..5cd6a695 100644 --- a/NorthstarDLL/masterserver/masterserver.h +++ b/NorthstarDLL/masterserver/masterserver.h @@ -126,6 +126,7 @@ class MasterServerManager void AuthenticateWithOwnServer(const char* uid, const char* playerToken); void AuthenticateWithServer(const char* uid, const char* playerToken, RemoteServerInfo server, const char* password); void WritePlayerPersistentData(const char* playerId, const char* pdata, size_t pdataSize); + void ProcessConnectionlessPacketSigreq1(std::string req); }; extern MasterServerManager* g_pMasterServerManager; |