Kernel: Add Socket::set_role() and use it everywhere

Instead of having Socket subclasses write their role into Socket::m_role
directly, add a setter to do this.
This commit is contained in:
Andreas Kling 2021-08-29 02:04:30 +02:00
commit a28cd921a1
Notes: sideshowbarker 2024-07-18 05:06:30 +09:00
6 changed files with 10 additions and 8 deletions

View file

@ -100,7 +100,7 @@ KResultOr<size_t> UDPSocket::protocol_send(const UserOrKernelBuffer& data, size_
KResult UDPSocket::protocol_connect(FileDescription&, ShouldBlock)
{
m_role = Role::Connected;
set_role(Role::Connected);
set_connected(true);
return KSuccess;
}