diff options
| author | 2016-12-14 20:35:33 -0800 | |
|---|---|---|
| committer | 2016-12-14 20:35:33 -0800 | |
| 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.gz yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.tar.xz yuzu-905fc92ce1f7d99d8819a17b180a559b3a9f15de.zip | |
Merge pull request #2249 from Subv/sessions_v3
Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <tuple> | ||
| 6 | |||
| 5 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 6 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "core/hle/kernel/client_session.h" | ||
| 7 | #include "core/hle/kernel/event.h" | 10 | #include "core/hle/kernel/event.h" |
| 11 | #include "core/hle/kernel/server_session.h" | ||
| 8 | #include "core/hle/service/srv.h" | 12 | #include "core/hle/service/srv.h" |
| 9 | 13 | ||
| 10 | namespace Service { | 14 | namespace Service { |
| @@ -79,7 +83,15 @@ static void GetServiceHandle(Interface* self) { | |||
| 79 | auto it = Service::g_srv_services.find(port_name); | 83 | auto it = Service::g_srv_services.find(port_name); |
| 80 | 84 | ||
| 81 | if (it != Service::g_srv_services.end()) { | 85 | if (it != Service::g_srv_services.end()) { |
| 82 | cmd_buff[3] = Kernel::g_handle_table.Create(it->second).MoveFrom(); | 86 | auto client_port = it->second; |
| 87 | |||
| 88 | auto client_session = client_port->Connect(); | ||
| 89 | res = client_session.Code(); | ||
| 90 | |||
| 91 | if (client_session.Succeeded()) { | ||
| 92 | // Return the client session | ||
| 93 | cmd_buff[3] = Kernel::g_handle_table.Create(*client_session).MoveFrom(); | ||
| 94 | } | ||
| 83 | LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); | 95 | LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); |
| 84 | } else { | 96 | } else { |
| 85 | LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); | 97 | LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); |