Просмотр исходного кода

k_server_session: add SendReplyHLE

Liam 3 лет назад
Родитель
Сommit
7aa91c8d9c

+ 4 - 0
src/core/hle/kernel/k_server_session.h

@@ -55,6 +55,10 @@ public:
     Result ReceiveRequest(std::shared_ptr<HLERequestContext>* out_context = nullptr,
     Result ReceiveRequest(std::shared_ptr<HLERequestContext>* out_context = nullptr,
                           std::weak_ptr<SessionRequestManager> manager = {});
                           std::weak_ptr<SessionRequestManager> manager = {});
 
 
+    Result SendReplyHLE() {
+        return SendReply(true);
+    }
+
 private:
 private:
     /// Frees up waiting client sessions when this server session is about to die
     /// Frees up waiting client sessions when this server session is about to die
     void CleanupRequests();
     void CleanupRequests();

+ 1 - 1
src/core/hle/kernel/service_thread.cpp

@@ -103,7 +103,7 @@ void ServiceThread::Impl::WaitAndProcessImpl() {
     Result service_rc = manager->CompleteSyncRequest(server_session, *context);
     Result service_rc = manager->CompleteSyncRequest(server_session, *context);
 
 
     // Reply to the client.
     // Reply to the client.
-    rc = server_session->SendReply(true);
+    rc = server_session->SendReplyHLE();
 
 
     if (rc == ResultSessionClosed || service_rc == IPC::ERR_REMOTE_PROCESS_DEAD) {
     if (rc == ResultSessionClosed || service_rc == IPC::ERR_REMOTE_PROCESS_DEAD) {
         SessionClosed(server_session, manager);
         SessionClosed(server_session, manager);

+ 1 - 4
src/core/hle/service/sm/sm_controller.cpp

@@ -33,16 +33,13 @@ void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) {
     // FIXME: this is duplicated from the SVC, it should just call it instead
     // FIXME: this is duplicated from the SVC, it should just call it instead
     // once this is a proper process
     // once this is a proper process
 
 
-    // Declare the session we're going to allocate.
-    Kernel::KSession* session;
-
     // Reserve a new session from the process resource limit.
     // Reserve a new session from the process resource limit.
     Kernel::KScopedResourceReservation session_reservation(&process,
     Kernel::KScopedResourceReservation session_reservation(&process,
                                                            Kernel::LimitableResource::Sessions);
                                                            Kernel::LimitableResource::Sessions);
     ASSERT(session_reservation.Succeeded());
     ASSERT(session_reservation.Succeeded());
 
 
     // Create the session.
     // Create the session.
-    session = Kernel::KSession::Create(system.Kernel());
+    Kernel::KSession* session = Kernel::KSession::Create(system.Kernel());
     ASSERT(session != nullptr);
     ASSERT(session != nullptr);
 
 
     // Initialize the session.
     // Initialize the session.