1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

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
parent 70b2225b3d
commit a28cd921a1
6 changed files with 10 additions and 8 deletions

View file

@ -141,7 +141,7 @@ KResult IPv4Socket::listen(size_t backlog)
return result.error_or_port.error();
set_backlog(backlog);
m_role = Role::Listener;
set_role(Role::Listener);
evaluate_block_conditions();
dbgln_if(IPV4_SOCKET_DEBUG, "IPv4Socket({}) listening with backlog={}", this, backlog);