sysupdater: implement (untested) rest of the api

This commit is contained in:
Michael Scire
2020-06-26 19:22:50 -07:00
parent 015537f9bf
commit 76fa4db2ed
22 changed files with 957 additions and 57 deletions

View File

@@ -27,7 +27,7 @@ namespace ams::mitm::sysupdater {
constexpr size_t SystemUpdateMaxSessions = 1;
constexpr size_t MaxServers = 1;
constexpr size_t MaxSessions = SystemUpdateMaxSessions;
constexpr size_t MaxSessions = SystemUpdateMaxSessions + 3;
struct ServerOptions {
static constexpr size_t PointerBufferSize = 1_KB;
@@ -37,6 +37,8 @@ namespace ams::mitm::sysupdater {
sf::hipc::ServerManager<MaxServers, ServerOptions, MaxSessions> g_server_manager;
constinit sysupdater::SystemUpdateService g_system_update_service_object;
}
void MitmModule::ThreadFunction(void *arg) {
@@ -48,7 +50,7 @@ namespace ams::mitm::sysupdater {
ON_SCOPE_EXIT { nim::FinalizeForNetworkInstallManager(); };
/* Register ams:su. */
R_ABORT_UNLESS((g_server_manager.RegisterServer<sysupdater::SystemUpdateService>(SystemUpdateServiceName, SystemUpdateMaxSessions)));
R_ABORT_UNLESS((g_server_manager.RegisterServer<sysupdater::SystemUpdateService>(SystemUpdateServiceName, SystemUpdateMaxSessions, sf::ServiceObjectTraits<sysupdater::SystemUpdateService>::SharedPointerHelper::GetEmptyDeleteSharedPointer(std::addressof(g_system_update_service_object)))));
/* Loop forever, servicing our services. */
g_server_manager.LoopProcess();