diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-12-15 05:35:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 05:35:33 +0100 |
commit | 905fc92ce1f7d99d8819a17b180a559b3a9f15de (patch) | |
tree | cc992764c2ea065d8d30dce2055cc1efe167bc59 /src/core/hle/service/srv.cpp | |
parent | Merge pull request #2166 from endrift/clang-detect (diff) | |
parent | Fixed the codestyle to match our clang-format rules. (diff) | |
download | yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar.gz yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar.bz2 yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar.lz yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar.xz yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar.zst yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.zip |
Diffstat (limited to 'src/core/hle/service/srv.cpp')
-rw-r--r-- | src/core/hle/service/srv.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index f8df38c42..3bd787147 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp @@ -2,9 +2,13 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <tuple> + #include "common/common_types.h" #include "common/logging/log.h" +#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/event.h" +#include "core/hle/kernel/server_session.h" #include "core/hle/service/srv.h" namespace Service { @@ -79,7 +83,15 @@ static void GetServiceHandle(Interface* self) { auto it = Service::g_srv_services.find(port_name); if (it != Service::g_srv_services.end()) { - cmd_buff[3] = Kernel::g_handle_table.Create(it->second).MoveFrom(); + auto client_port = it->second; + + auto client_session = client_port->Connect(); + res = client_session.Code(); + + if (client_session.Succeeded()) { + // Return the client session + cmd_buff[3] = Kernel::g_handle_table.Create(*client_session).MoveFrom(); + } LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); } else { LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); |