aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/srv.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-02-02 13:04:04 -0500
committerbunnei <bunneidev@gmail.com>2015-02-02 13:04:04 -0500
commit7f730ed158bc9bba064100b9644b318134ef0bb3 (patch)
treec4181a69ff882e1af1b7d65bf3596a6cb3dd88b9 /src/core/hle/service/srv.cpp
parente1f9f9ea048f3f085e50463d9b0c7a0f99d9bc3c (diff)
parent88a4a808c688eeabb136e9b45223a0e9c95896bc (diff)
Merge pull request #523 from yuriks/kernel-lifetime5
Kernel Lifetime Reform Pt. 5: The Reckoning
Diffstat (limited to 'src/core/hle/service/srv.cpp')
-rw-r--r--src/core/hle/service/srv.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index aa0aac3bb..cc59a03ce 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -23,7 +23,7 @@ static void GetProcSemaphore(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
// TODO(bunnei): Change to a semaphore once these have been implemented
- event_handle = Kernel::Event::Create(RESETTYPE_ONESHOT, "SRV:Event").MoveFrom();
+ event_handle = Kernel::Event::Create(RESETTYPE_ONESHOT, "SRV:Event");
event_handle->Clear();
cmd_buff[1] = 0; // No error
@@ -35,10 +35,10 @@ static void GetServiceHandle(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
std::string port_name = std::string((const char*)&cmd_buff[1], 0, Service::kMaxPortSize);
- Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
+ auto it = Service::g_srv_services.find(port_name);
- if (nullptr != service) {
- cmd_buff[3] = service->GetHandle();
+ if (it != Service::g_srv_services.end()) {
+ cmd_buff[3] = Kernel::g_handle_table.Create(it->second).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());
@@ -63,7 +63,7 @@ const Interface::FunctionInfo FunctionTable[] = {
// Interface class
Interface::Interface() {
- Register(FunctionTable, ARRAY_SIZE(FunctionTable));
+ Register(FunctionTable);
}
} // namespace