summaryrefslogtreecommitdiff
path: root/src/core/hle/service/lm
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-23 19:43:59 -0500
committerGravatar bunnei2018-01-24 22:21:33 -0500
commitf9dae990066cb0fa3730a811353781e9e7bffa19 (patch)
tree1122f389ab4ffd56e622fe9e89c7e9130937954f /src/core/hle/service/lm
parentipc_helpers: Make interface domain agnostic and add header validation. (diff)
downloadyuzu-f9dae990066cb0fa3730a811353781e9e7bffa19.tar.gz
yuzu-f9dae990066cb0fa3730a811353781e9e7bffa19.tar.xz
yuzu-f9dae990066cb0fa3730a811353781e9e7bffa19.zip
service: Fix all incorrect IPC response headers.
Diffstat (limited to 'src/core/hle/service/lm')
-rw-r--r--src/core/hle/service/lm/lm.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index b505cdcaf..d5dcc8eaf 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -65,7 +65,7 @@ private:
65 */ 65 */
66 void Log(Kernel::HLERequestContext& ctx) { 66 void Log(Kernel::HLERequestContext& ctx) {
67 // This function only succeeds - Get that out of the way 67 // This function only succeeds - Get that out of the way
68 IPC::RequestBuilder rb{ctx, 1}; 68 IPC::RequestBuilder rb{ctx, 2};
69 rb.Push(RESULT_SUCCESS); 69 rb.Push(RESULT_SUCCESS);
70 70
71 // Read MessageHeader, despite not doing anything with it right now 71 // Read MessageHeader, despite not doing anything with it right now
@@ -130,7 +130,7 @@ private:
130 } 130 }
131 output += message; 131 output += message;
132 132
133 LOG_DEBUG(Debug_Emulated, "%s", output.c_str()); 133 LOG_INFO(Debug_Emulated, "%s", output.c_str());
134 } 134 }
135}; 135};
136 136
@@ -146,21 +146,11 @@ void InstallInterfaces(SM::ServiceManager& service_manager) {
146 * 0: ResultCode 146 * 0: ResultCode
147 */ 147 */
148void LM::Initialize(Kernel::HLERequestContext& ctx) { 148void LM::Initialize(Kernel::HLERequestContext& ctx) {
149 // TODO(Subv): Verify if this should return the interface as a domain object when called from
150 // within a domain.
151
152 auto logger = std::make_shared<Logger>();
153 auto sessions = Kernel::ServerSession::CreateSessionPair(logger->GetServiceName());
154 auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
155 auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
156 logger->ClientConnected(server);
157
158 LOG_DEBUG(Service_SM, "called, initialized logger -> session=%u", client->GetObjectId());
159 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 149 IPC::RequestBuilder rb{ctx, 2, 0, 1};
160 rb.Push(RESULT_SUCCESS); 150 rb.Push(RESULT_SUCCESS);
161 rb.PushMoveObjects(std::move(client)); 151 rb.PushIpcInterface<Logger>();
162 152
163 LOG_INFO(Service_SM, "called"); 153 LOG_DEBUG(Service, "called");
164} 154}
165 155
166LM::LM() : ServiceFramework("lm") { 156LM::LM() : ServiceFramework("lm") {