fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.
This commit is contained in:
parent
1b074b8984
commit
f6d45b747e
3 changed files with 28 additions and 22 deletions
|
@ -49,24 +49,30 @@ void KSession::Initialize(KClientPort* port_, const std::string& name_) {
|
|||
}
|
||||
|
||||
void KSession::Finalize() {
|
||||
if (port != nullptr) {
|
||||
port->OnSessionFinalized();
|
||||
port->Close();
|
||||
if (port == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
port->OnSessionFinalized();
|
||||
port->Close();
|
||||
}
|
||||
|
||||
void KSession::OnServerClosed() {
|
||||
if (GetState() == State::Normal) {
|
||||
SetState(State::ServerClosed);
|
||||
client.OnServerClosed();
|
||||
if (GetState() != State::Normal) {
|
||||
return;
|
||||
}
|
||||
|
||||
SetState(State::ServerClosed);
|
||||
client.OnServerClosed();
|
||||
}
|
||||
|
||||
void KSession::OnClientClosed() {
|
||||
if (GetState() == State::Normal) {
|
||||
SetState(State::ClientClosed);
|
||||
server.OnClientClosed();
|
||||
if (GetState() != State::Normal) {
|
||||
return;
|
||||
}
|
||||
|
||||
SetState(State::ClientClosed);
|
||||
server.OnClientClosed();
|
||||
}
|
||||
|
||||
void KSession::PostDestroy(uintptr_t arg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue