diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2020-04-29 03:15:21 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2020-04-29 03:15:21 +0200 |
commit | b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34 (patch) | |
tree | 93daa1ff710211388755f1dbf06a06dbd3d3cce6 /src/core/hle/service/sm/sm.cpp | |
parent | Merge pull request #3784 from ReinUsesLisp/shader-memory-util (diff) | |
download | yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.tar yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.tar.gz yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.tar.bz2 yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.tar.lz yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.tar.xz yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.tar.zst yuzu-b4dbf1b9c7a69ee7ba9682fe0d6c8377f0512a34.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/sm/sm.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 88909504d..6ada13be4 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -28,9 +28,11 @@ void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) { static ResultCode ValidateServiceName(const std::string& name) { if (name.size() <= 0 || name.size() > 8) { + LOG_ERROR(Service_SM, "Invalid service name! service={}", name); return ERR_INVALID_NAME; } if (name.find('\0') != std::string::npos) { + LOG_ERROR(Service_SM, "A non null terminated service was passed"); return ERR_INVALID_NAME; } return RESULT_SUCCESS; @@ -51,8 +53,10 @@ ResultVal<std::shared_ptr<Kernel::ServerPort>> ServiceManager::RegisterService( CASCADE_CODE(ValidateServiceName(name)); - if (registered_services.find(name) != registered_services.end()) + if (registered_services.find(name) != registered_services.end()) { + LOG_ERROR(Service_SM, "Service is already registered! service={}", name); return ERR_ALREADY_REGISTERED; + } auto& kernel = Core::System::GetInstance().Kernel(); auto [server_port, client_port] = @@ -66,9 +70,10 @@ ResultCode ServiceManager::UnregisterService(const std::string& name) { CASCADE_CODE(ValidateServiceName(name)); const auto iter = registered_services.find(name); - if (iter == registered_services.end()) + if (iter == registered_services.end()) { + LOG_ERROR(Service_SM, "Server is not registered! service={}", name); return ERR_SERVICE_NOT_REGISTERED; - + } registered_services.erase(iter); return RESULT_SUCCESS; } @@ -79,6 +84,7 @@ ResultVal<std::shared_ptr<Kernel::ClientPort>> ServiceManager::GetServicePort( CASCADE_CODE(ValidateServiceName(name)); auto it = registered_services.find(name); if (it == registered_services.end()) { + LOG_ERROR(Service_SM, "Server is not registered! service={}", name); return ERR_SERVICE_NOT_REGISTERED; } |