1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

Kernel: Add so_error to keep track of the socket's error state

This sets the m_so_error variable every time the socket returns an
error.
This commit is contained in:
brapru 2021-08-01 11:27:23 -04:00 committed by Andreas Kling
parent f424485193
commit 0095c7cb7d
6 changed files with 88 additions and 78 deletions

View file

@ -130,6 +130,13 @@ protected:
Role m_role { Role::None };
KResult so_error() const { return m_so_error; }
KResult set_so_error(KResult error)
{
m_so_error = error;
return error;
}
protected:
ucred m_origin { 0, 0, 0 };
ucred m_acceptor { 0, 0, 0 };
@ -154,6 +161,8 @@ private:
Time m_send_timeout {};
int m_timestamp { 0 };
KResult m_so_error { KSuccess };
NonnullRefPtrVector<Socket> m_pending;
};