summaryrefslogtreecommitdiff
path: root/Userland/Services/DHCPClient
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-31 23:38:04 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-02 22:56:53 +0100
commit4e55d649d72055f817439f5db8517c9af9cab44a (patch)
tree9307cdf2c618afd6fd68e601c78414ff553c2280 /Userland/Services/DHCPClient
parentb3e9a4e603ce6371e7c1a092bd70e5f367384c4b (diff)
downloadserenity-4e55d649d72055f817439f5db8517c9af9cab44a.zip
Services: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
Diffstat (limited to 'Userland/Services/DHCPClient')
-rw-r--r--Userland/Services/DHCPClient/DHCPv4Client.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.h b/Userland/Services/DHCPClient/DHCPv4Client.h
index c3901ab713..cdd5cf7b00 100644
--- a/Userland/Services/DHCPClient/DHCPv4Client.h
+++ b/Userland/Services/DHCPClient/DHCPv4Client.h
@@ -40,7 +40,6 @@ class DHCPv4Client final : public Core::Object {
C_OBJECT(DHCPv4Client)
public:
- explicit DHCPv4Client();
virtual ~DHCPv4Client() override;
void dhcp_discover(const InterfaceDescriptor& ifname);
@@ -57,6 +56,8 @@ public:
static Result<Interfaces, String> get_discoverable_interfaces();
private:
+ explicit DHCPv4Client();
+
void try_discover_ifs();
HashMap<u32, OwnPtr<DHCPv4Transaction>> m_ongoing_transactions;