diff options
Diffstat (limited to 'src/core/hle/service/srv.cpp')
| -rw-r--r-- | src/core/hle/service/srv.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index aa0aac3bb..c50aebf15 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp | |||
| @@ -35,10 +35,10 @@ static void GetServiceHandle(Service::Interface* self) { | |||
| 35 | u32* cmd_buff = Kernel::GetCommandBuffer(); | 35 | u32* cmd_buff = Kernel::GetCommandBuffer(); |
| 36 | 36 | ||
| 37 | std::string port_name = std::string((const char*)&cmd_buff[1], 0, Service::kMaxPortSize); | 37 | std::string port_name = std::string((const char*)&cmd_buff[1], 0, Service::kMaxPortSize); |
| 38 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); | 38 | auto it = Service::g_srv_services.find(port_name); |
| 39 | 39 | ||
| 40 | if (nullptr != service) { | 40 | if (it != Service::g_srv_services.end()) { |
| 41 | cmd_buff[3] = service->GetHandle(); | 41 | cmd_buff[3] = Kernel::g_handle_table.Create(it->second).MoveFrom(); |
| 42 | LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); | 42 | LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); |
| 43 | } else { | 43 | } else { |
| 44 | LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); | 44 | LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); |