hle: service: sm: Remove manual tracking of KServerPorts.
This commit is contained in:
parent
f55fc850a2
commit
d737652d08
@ -153,7 +153,6 @@ ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext&
|
|||||||
auto& port = port_result.Unwrap();
|
auto& port = port_result.Unwrap();
|
||||||
SCOPE_EXIT({ port->GetClientPort().Close(); });
|
SCOPE_EXIT({ port->GetClientPort().Close(); });
|
||||||
|
|
||||||
server_ports.emplace_back(&port->GetServerPort());
|
|
||||||
|
|
||||||
// Create a new session.
|
// Create a new session.
|
||||||
Kernel::KClientSession* session{};
|
Kernel::KClientSession* session{};
|
||||||
@ -224,10 +223,6 @@ SM::SM(ServiceManager& service_manager_, Core::System& system_)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SM::~SM() {
|
SM::~SM() = default;
|
||||||
for (auto& server_port : server_ports) {
|
|
||||||
server_port->Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Service::SM
|
} // namespace Service::SM
|
||||||
|
@ -22,7 +22,6 @@ class KClientPort;
|
|||||||
class KClientSession;
|
class KClientSession;
|
||||||
class KernelCore;
|
class KernelCore;
|
||||||
class KPort;
|
class KPort;
|
||||||
class KServerPort;
|
|
||||||
class SessionRequestHandler;
|
class SessionRequestHandler;
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
||||||
@ -48,7 +47,6 @@ private:
|
|||||||
ServiceManager& service_manager;
|
ServiceManager& service_manager;
|
||||||
bool is_initialized{};
|
bool is_initialized{};
|
||||||
Kernel::KernelCore& kernel;
|
Kernel::KernelCore& kernel;
|
||||||
std::vector<Kernel::KServerPort*> server_ports;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ServiceManager {
|
class ServiceManager {
|
||||||
|
Loading…
Reference in New Issue
Block a user