summaryrefslogtreecommitdiff
path: root/Kernel/Net/IPv4Socket.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-29 02:04:30 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-29 02:21:01 +0200
commita28cd921a1df15a51555284cb74efc7d8758812f (patch)
tree86b5ea0c39834a9e38916e6a87ddca9a8a6a2e8a /Kernel/Net/IPv4Socket.cpp
parent70b2225b3d09ef5fe85f0b42c461c79d0afde47b (diff)
downloadserenity-a28cd921a1df15a51555284cb74efc7d8758812f.zip
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.
Diffstat (limited to 'Kernel/Net/IPv4Socket.cpp')
-rw-r--r--Kernel/Net/IPv4Socket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index 51e61eacd0..bbb3601ebb 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -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);