mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 13:14:15 -04:00
kern: update port/session state semantics
This commit is contained in:
parent
c62a7381f8
commit
cbdf33260e
7 changed files with 32 additions and 11 deletions
|
@ -35,7 +35,7 @@ namespace ams::kern {
|
|||
m_client.Initialize(this);
|
||||
|
||||
/* Set state and name. */
|
||||
m_state = State::Normal;
|
||||
this->SetState(State::Normal);
|
||||
m_name = name;
|
||||
|
||||
/* Set our owner process. */
|
||||
|
@ -62,8 +62,8 @@ namespace ams::kern {
|
|||
void KSession::OnServerClosed() {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
if (m_state == State::Normal) {
|
||||
m_state = State::ServerClosed;
|
||||
if (this->GetState() == State::Normal) {
|
||||
this->SetState(State::ServerClosed);
|
||||
m_client.OnServerClosed();
|
||||
}
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ namespace ams::kern {
|
|||
void KSession::OnClientClosed() {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
if (m_state == State::Normal) {
|
||||
m_state = State::ClientClosed;
|
||||
if (this->GetState() == State::Normal) {
|
||||
this->SetState(State::ClientClosed);
|
||||
m_server.OnClientClosed();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue