diff --git a/libraries/libstratosphere/include/stratosphere/htcs.hpp b/libraries/libstratosphere/include/stratosphere/htcs.hpp index 59881a770..cda430983 100644 --- a/libraries/libstratosphere/include/stratosphere/htcs.hpp +++ b/libraries/libstratosphere/include/stratosphere/htcs.hpp @@ -18,3 +18,4 @@ #include #include #include +#include diff --git a/libraries/libstratosphere/include/stratosphere/htcs/server/htcs_hipc_server.hpp b/libraries/libstratosphere/include/stratosphere/htcs/server/htcs_hipc_server.hpp new file mode 100644 index 000000000..20c39070a --- /dev/null +++ b/libraries/libstratosphere/include/stratosphere/htcs/server/htcs_hipc_server.hpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include + +namespace ams::htcs::server { + + void Initialize(); + + void RegisterHipcServer(); + void LoopHipcServer(); + +} diff --git a/libraries/libstratosphere/source/htcs/server/htcs_hipc_server.cpp b/libraries/libstratosphere/source/htcs/server/htcs_hipc_server.cpp new file mode 100644 index 000000000..26f4301f3 --- /dev/null +++ b/libraries/libstratosphere/source/htcs/server/htcs_hipc_server.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "htcs_manager_service_object.hpp" + +namespace ams::htcs::server { + + namespace { + + static constexpr inline size_t NumServers = 1; + static constexpr inline size_t MaxSessions = 63; + static constexpr inline sm::ServiceName ServiceName = sm::ServiceName::Encode("htcs"); + + struct ServerOptions { + static constexpr size_t PointerBufferSize = 0x80; + static constexpr size_t MaxDomains = 0x10; + static constexpr size_t MaxDomainObjects = 100; + }; + + using ServerManager = sf::hipc::ServerManager; + + /* Service object. */ + ServerManager g_server_manager; + + /* Service object. */ + constinit sf::UnmanagedServiceObject g_htcs_service_object; + + } + + void Initialize() { + /* Add a reference to the htcs manager. */ + htcs::impl::HtcsManagerHolder::AddReference(); + } + + void RegisterHipcServer() { + /* Register the service. */ + R_ABORT_UNLESS(g_server_manager.RegisterObjectForServer(g_htcs_service_object.GetShared(), ServiceName, MaxSessions)); + } + + void LoopHipcServer() { + /* Loop, servicing services. */ + g_server_manager.LoopProcess(); + } + +} diff --git a/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object.cpp b/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object.cpp new file mode 100644 index 000000000..a01a6df4f --- /dev/null +++ b/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object.cpp @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "htcs_manager_service_object.hpp" +#include "htcs_socket_service_object.hpp" + +namespace ams::htcs::server { + + namespace { + + struct ServiceObjectAllocatorTag; + using ServiceObjectAllocator = ams::sf::ExpHeapStaticAllocator<32_KB, ServiceObjectAllocatorTag>; + using ServiceObjectFactory = ams::sf::ObjectFactory; + + class StaticAllocatorInitializer { + public: + StaticAllocatorInitializer() { + ServiceObjectAllocator::Initialize(lmem::CreateOption_ThreadSafe); + } + } g_static_allocator_initializer; + + } + + Result ManagerServiceObject::GetPeerNameAny(sf::Out out) { + AMS_ABORT("ManagerServiceObject::GetPeerNameAny"); + } + + Result ManagerServiceObject::GetDefaultHostName(sf::Out out) { + AMS_ABORT("ManagerServiceObject::GetDefaultHostName"); + } + + Result ManagerServiceObject::CreateSocketOld(sf::Out out_err, sf::Out> out) { + return this->CreateSocket(out_err, out, false); + } + + Result ManagerServiceObject::CreateSocket(sf::Out out_err, sf::Out> out, bool enable_disconnection_emulation) { + AMS_ABORT("ManagerServiceObject::CreateSocket"); + } + + Result ManagerServiceObject::RegisterProcessId(const sf::ClientProcessId &client_pid) { + /* NOTE: Nintend does nothing here. */ + return ResultSuccess(); + } + + Result ManagerServiceObject::MonitorManager(const sf::ClientProcessId &client_pid) { + /* NOTE: Nintend does nothing here. */ + return ResultSuccess(); + } + + Result ManagerServiceObject::StartSelect(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InMapAliasArray &read_handles, const sf::InMapAliasArray &write_handles, const sf::InMapAliasArray &exception_handles, s64 tv_sec, s64 tv_usec) { + AMS_ABORT("ManagerServiceObject::StartSelect"); + } + + Result ManagerServiceObject::EndSelect(sf::Out out_err, sf::Out out_res, const sf::OutMapAliasArray &read_handles, const sf::OutMapAliasArray &write_handles, const sf::OutMapAliasArray &exception_handles, u32 task_id) { + AMS_ABORT("ManagerServiceObject::EndSelect"); + } + +} diff --git a/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object.hpp b/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object.hpp new file mode 100644 index 000000000..43e62d5b1 --- /dev/null +++ b/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object.hpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include + +namespace ams::htcs::server { + + class ManagerServiceObject : public sf::ISharedObject { + public: + Result Socket(sf::Out out_err, sf::Out out_sock); + Result Close(sf::Out out_err, sf::Out out_res, s32 desc); + Result Connect(sf::Out out_err, sf::Out out_res, s32 desc, const htcs::SockAddrHtcs &address); + Result Bind(sf::Out out_err, sf::Out out_res, s32 desc, const htcs::SockAddrHtcs &address); + Result Listen(sf::Out out_err, sf::Out out_res, s32 desc, s32 backlog_count); + Result Accept(sf::Out out_err, sf::Out out_res, sf::Out out_address, s32 desc); + Result Recv(sf::Out out_err, sf::Out out_size, const sf::OutBuffer &buffer, s32 desc, s32 flags); + Result Send(sf::Out out_err, sf::Out out_size, s32 desc, const sf::InBuffer &buffer, s32 flags); + Result Shutdown(sf::Out out_err, sf::Out out_res, s32 desc, s32 how); + Result Fcntl(sf::Out out_err, sf::Out out_res, s32 desc, s32 command, s32 value); + Result GetPeerNameAny(sf::Out out); + Result GetDefaultHostName(sf::Out out); + Result CreateSocketOld(sf::Out out_err, sf::Out> out); + Result CreateSocket(sf::Out out_err, sf::Out> out, bool enable_disconnection_emulation); + Result RegisterProcessId(const sf::ClientProcessId &client_pid); + Result MonitorManager(const sf::ClientProcessId &client_pid); + Result StartSelect(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InMapAliasArray &read_handles, const sf::InMapAliasArray &write_handles, const sf::InMapAliasArray &exception_handles, s64 tv_sec, s64 tv_usec); + Result EndSelect(sf::Out out_err, sf::Out out_res, const sf::OutMapAliasArray &read_handles, const sf::OutMapAliasArray &write_handles, const sf::OutMapAliasArray &exception_handles, u32 task_id); + }; + static_assert(tma::IsIHtcsManager); + +} diff --git a/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object_reprecated.cpp b/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object_reprecated.cpp new file mode 100644 index 000000000..43dc60c0c --- /dev/null +++ b/libraries/libstratosphere/source/htcs/server/htcs_manager_service_object_reprecated.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "htcs_manager_service_object.hpp" +#include "htcs_socket_service_object.hpp" + +namespace ams::htcs::server { + + #define AMS_HTCS_MANAGER_DEPRECATED_API() AMS_ABORT("Deprecated IHtcsManager API %s was called.\n", AMS_CURRENT_FUNCTION_NAME) + + Result ManagerServiceObject::Socket(sf::Out out_err, sf::Out out_sock) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Close(sf::Out out_err, sf::Out out_res, s32 desc) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Connect(sf::Out out_err, sf::Out out_res, s32 desc, const htcs::SockAddrHtcs &address) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Bind(sf::Out out_err, sf::Out out_res, s32 desc, const htcs::SockAddrHtcs &address) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Listen(sf::Out out_err, sf::Out out_res, s32 desc, s32 backlog_count) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Accept(sf::Out out_err, sf::Out out_res, sf::Out out_address, s32 desc) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Recv(sf::Out out_err, sf::Out out_size, const sf::OutBuffer &buffer, s32 desc, s32 flags) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Send(sf::Out out_err, sf::Out out_size, s32 desc, const sf::InBuffer &buffer, s32 flags) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Shutdown(sf::Out out_err, sf::Out out_res, s32 desc, s32 how) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + + Result ManagerServiceObject::Fcntl(sf::Out out_err, sf::Out out_res, s32 desc, s32 command, s32 value) { + /* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */ + AMS_HTCS_MANAGER_DEPRECATED_API(); + } + +} diff --git a/libraries/libstratosphere/source/htcs/server/htcs_socket_service_object.cpp b/libraries/libstratosphere/source/htcs/server/htcs_socket_service_object.cpp new file mode 100644 index 000000000..ebf277520 --- /dev/null +++ b/libraries/libstratosphere/source/htcs/server/htcs_socket_service_object.cpp @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "htcs_socket_service_object.hpp" + +namespace ams::htcs::server { + + SocketServiceObject::SocketServiceObject(ManagerServiceObject *manager, s32 desc) : m_manager(manager, true), m_desc(desc) { + /* ... */ + } + + SocketServiceObject::~SocketServiceObject() { + AMS_ABORT("SocketServiceObject::~SocketServiceObject"); + } + + Result SocketServiceObject::Close(sf::Out out_err, sf::Out out_res) { + AMS_ABORT("SocketServiceObject::Close"); + } + + Result SocketServiceObject::Connect(sf::Out out_err, sf::Out out_res, const htcs::SockAddrHtcs &address) { + AMS_ABORT("SocketServiceObject::Connect"); + } + + Result SocketServiceObject::Bind(sf::Out out_err, sf::Out out_res, const htcs::SockAddrHtcs &address) { + AMS_ABORT("SocketServiceObject::Bind"); + } + + Result SocketServiceObject::Listen(sf::Out out_err, sf::Out out_res, s32 backlog_count) { + AMS_ABORT("SocketServiceObject::Listen"); + } + + Result SocketServiceObject::Accept(sf::Out out_err, sf::Out> out, sf::Out out_address) { + AMS_ABORT("SocketServiceObject::Accept"); + } + + Result SocketServiceObject::Recv(sf::Out out_err, sf::Out out_size, const sf::OutAutoSelectBuffer &buffer, s32 flags) { + AMS_ABORT("SocketServiceObject::Recv"); + } + + Result SocketServiceObject::Send(sf::Out out_err, sf::Out out_size, const sf::InAutoSelectBuffer &buffer, s32 flags) { + AMS_ABORT("SocketServiceObject::Send"); + } + + Result SocketServiceObject::Shutdown(sf::Out out_err, sf::Out out_res, s32 how) { + AMS_ABORT("SocketServiceObject::Shutdown"); + } + + Result SocketServiceObject::Fcntl(sf::Out out_err, sf::Out out_res, s32 command, s32 value) { + AMS_ABORT("SocketServiceObject::Fcntl"); + } + + Result SocketServiceObject::AcceptStart(sf::Out out_task_id, sf::OutCopyHandle out_event) { + AMS_ABORT("SocketServiceObject::AcceptStart"); + } + + Result SocketServiceObject::AcceptResults(sf::Out out_err, sf::Out> out, sf::Out out_address, u32 task_id) { + AMS_ABORT("SocketServiceObject::AcceptResults"); + } + + Result SocketServiceObject::RecvStart(sf::Out out_task_id, sf::OutCopyHandle out_event, s32 mem_size, s32 flags) { + AMS_ABORT("SocketServiceObject::RecvStart"); + } + + Result SocketServiceObject::RecvResults(sf::Out out_err, sf::Out out_size, const sf::OutAutoSelectBuffer &buffer, u32 task_id) { + AMS_ABORT("SocketServiceObject::RecvResults"); + } + + Result SocketServiceObject::RecvLargeStart(sf::Out out_task_id, sf::OutCopyHandle out_event, s32 unaligned_size_start, s32 unaligned_size_end, s64 aligned_size, sf::CopyHandle mem_handle, s32 flags) { + AMS_ABORT("SocketServiceObject::RecvLargeStart"); + } + + Result SocketServiceObject::SendStartOld(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InAutoSelectBuffer &buffer, s32 flags) { + AMS_ABORT("SocketServiceObject::SendStartOld"); + } + + Result SocketServiceObject::SendLargeStart(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InAutoSelectBuffer &start_buffer, const sf::InAutoSelectBuffer &end_buffer, sf::CopyHandle mem_handle, s64 aligned_size, s32 flags) { + AMS_ABORT("SocketServiceObject::SendLargeStart"); + } + + Result SocketServiceObject::SendResults(sf::Out out_err, sf::Out out_size, u32 task_id) { + AMS_ABORT("SocketServiceObject::SendResults"); + } + + Result SocketServiceObject::StartSend(sf::Out out_task_id, sf::OutCopyHandle out_event, sf::Out out_max_size, s64 size, s32 flags) { + AMS_ABORT("SocketServiceObject::StartSend"); + } + + Result SocketServiceObject::ContinueSendOld(sf::Out out_size, sf::Out out_wait, const sf::InAutoSelectBuffer &buffer, u32 task_id) { + AMS_ABORT("SocketServiceObject::ContinueSendOld"); + } + + Result SocketServiceObject::EndSend(sf::Out out_err, sf::Out out_size, u32 task_id) { + AMS_ABORT("SocketServiceObject::EndSend"); + } + + Result SocketServiceObject::StartRecv(sf::Out out_task_id, sf::OutCopyHandle out_event, s64 size, s32 flags) { + AMS_ABORT("SocketServiceObject::StartRecv"); + } + + Result SocketServiceObject::EndRecv(sf::Out out_err, sf::Out out_size, const sf::OutAutoSelectBuffer &buffer, u32 task_id) { + AMS_ABORT("SocketServiceObject::EndRecv"); + } + + Result SocketServiceObject::SendStart(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InNonSecureAutoSelectBuffer &buffer, s32 flags) { + AMS_ABORT("SocketServiceObject::SendStart"); + } + + Result SocketServiceObject::ContinueSend(sf::Out out_size, sf::Out out_wait, const sf::InNonSecureAutoSelectBuffer &buffer, u32 task_id) { + AMS_ABORT("SocketServiceObject::ContinueSend"); + } + + Result SocketServiceObject::GetPrimitive(sf::Out out) { + AMS_ABORT("SocketServiceObject::GetPrimitive"); + } + +} diff --git a/libraries/libstratosphere/source/htcs/server/htcs_socket_service_object.hpp b/libraries/libstratosphere/source/htcs/server/htcs_socket_service_object.hpp new file mode 100644 index 000000000..043af4030 --- /dev/null +++ b/libraries/libstratosphere/source/htcs/server/htcs_socket_service_object.hpp @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include +#include "htcs_manager_service_object.hpp" + +namespace ams::htcs::server { + + class SocketServiceObject { + private: + sf::SharedPointer m_manager; + s32 m_desc; + public: + SocketServiceObject(ManagerServiceObject *manager, s32 desc); + ~SocketServiceObject(); + public: + Result Close(sf::Out out_err, sf::Out out_res); + Result Connect(sf::Out out_err, sf::Out out_res, const htcs::SockAddrHtcs &address); + Result Bind(sf::Out out_err, sf::Out out_res, const htcs::SockAddrHtcs &address); + Result Listen(sf::Out out_err, sf::Out out_res, s32 backlog_count); + Result Accept(sf::Out out_err, sf::Out> out, sf::Out out_address); + Result Recv(sf::Out out_err, sf::Out out_size, const sf::OutAutoSelectBuffer &buffer, s32 flags); + Result Send(sf::Out out_err, sf::Out out_size, const sf::InAutoSelectBuffer &buffer, s32 flags); + Result Shutdown(sf::Out out_err, sf::Out out_res, s32 how); + Result Fcntl(sf::Out out_err, sf::Out out_res, s32 command, s32 value); + Result AcceptStart(sf::Out out_task_id, sf::OutCopyHandle out_event); + Result AcceptResults(sf::Out out_err, sf::Out> out, sf::Out out_address, u32 task_id); + Result RecvStart(sf::Out out_task_id, sf::OutCopyHandle out_event, s32 mem_size, s32 flags); + Result RecvResults(sf::Out out_err, sf::Out out_size, const sf::OutAutoSelectBuffer &buffer, u32 task_id); + Result RecvLargeStart(sf::Out out_task_id, sf::OutCopyHandle out_event, s32 unaligned_size_start, s32 unaligned_size_end, s64 aligned_size, sf::CopyHandle mem_handle, s32 flags); + Result SendStartOld(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InAutoSelectBuffer &buffer, s32 flags); + Result SendLargeStart(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InAutoSelectBuffer &start_buffer, const sf::InAutoSelectBuffer &end_buffer, sf::CopyHandle mem_handle, s64 aligned_size, s32 flags); + Result SendResults(sf::Out out_err, sf::Out out_size, u32 task_id); + Result StartSend(sf::Out out_task_id, sf::OutCopyHandle out_event, sf::Out out_max_size, s64 size, s32 flags); + Result ContinueSendOld(sf::Out out_size, sf::Out out_wait, const sf::InAutoSelectBuffer &buffer, u32 task_id); + Result EndSend(sf::Out out_err, sf::Out out_size, u32 task_id); + Result StartRecv(sf::Out out_task_id, sf::OutCopyHandle out_event, s64 size, s32 flags); + Result EndRecv(sf::Out out_err, sf::Out out_size, const sf::OutAutoSelectBuffer &buffer, u32 task_id); + Result SendStart(sf::Out out_task_id, sf::OutCopyHandle out_event, const sf::InNonSecureAutoSelectBuffer &buffer, s32 flags); + Result ContinueSend(sf::Out out_size, sf::Out out_wait, const sf::InNonSecureAutoSelectBuffer &buffer, u32 task_id); + Result GetPrimitive(sf::Out out); + }; + static_assert(tma::IsISocket); + +} diff --git a/stratosphere/htc/source/htc_main.cpp b/stratosphere/htc/source/htc_main.cpp index d3ebba403..4f4bd1c2a 100644 --- a/stratosphere/htc/source/htc_main.cpp +++ b/stratosphere/htc/source/htc_main.cpp @@ -214,7 +214,7 @@ namespace ams::htc { } void HtcsIpcThreadFunction(void *arg) { - //htcs::server::LoopHipcServer(); + htcs::server::LoopHipcServer(); } } @@ -263,8 +263,8 @@ int main(int argc, char **argv) os::SetThreadNamePointer(std::addressof(htcfs_ipc_thread), AMS_GET_SYSTEM_THREAD_NAME(htc, HtcfsIpc)); /* Initialize the htcs server. */ - //htcs::server::Initialize(); - //htcs::server::RegisterHipcServer(); + htcs::server::Initialize(); + htcs::server::RegisterHipcServer(); /* Create the htcs ipc threads. */ os::ThreadType htcs_ipc_threads[htc::NumHtcsIpcThreads];