summaryrefslogtreecommitdiff
path: root/Userland/Services/LookupServer/ClientConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/LookupServer/ClientConnection.cpp')
-rw-r--r--Userland/Services/LookupServer/ClientConnection.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Services/LookupServer/ClientConnection.cpp b/Userland/Services/LookupServer/ClientConnection.cpp
index dfab779fe7..51adca6e07 100644
--- a/Userland/Services/LookupServer/ClientConnection.cpp
+++ b/Userland/Services/LookupServer/ClientConnection.cpp
@@ -28,22 +28,22 @@ void ClientConnection::die()
s_connections.remove(client_id());
}
-OwnPtr<Messages::LookupServer::LookupNameResponse> ClientConnection::handle(const Messages::LookupServer::LookupName& message)
+Messages::LookupServer::LookupNameResponse ClientConnection::handle(const Messages::LookupServer::LookupName& message)
{
auto answers = LookupServer::the().lookup(message.name(), T_A);
if (answers.is_empty())
- return make<Messages::LookupServer::LookupNameResponse>(1, Vector<String>());
+ return { 1, Vector<String>() };
Vector<String> addresses;
for (auto& answer : answers) {
addresses.append(answer.record_data());
}
- return make<Messages::LookupServer::LookupNameResponse>(0, move(addresses));
+ return { 0, move(addresses) };
}
-OwnPtr<Messages::LookupServer::LookupAddressResponse> ClientConnection::handle(const Messages::LookupServer::LookupAddress& message)
+Messages::LookupServer::LookupAddressResponse ClientConnection::handle(const Messages::LookupServer::LookupAddress& message)
{
if (message.address().length() != 4)
- return make<Messages::LookupServer::LookupAddressResponse>(1, String());
+ return { 1, String() };
IPv4Address address { (const u8*)message.address().characters() };
auto name = String::formatted("{}.{}.{}.{}.in-addr.arpa",
address[3],
@@ -52,7 +52,7 @@ OwnPtr<Messages::LookupServer::LookupAddressResponse> ClientConnection::handle(c
address[0]);
auto answers = LookupServer::the().lookup(name, T_PTR);
if (answers.is_empty())
- return make<Messages::LookupServer::LookupAddressResponse>(1, String());
- return make<Messages::LookupServer::LookupAddressResponse>(0, answers[0].record_data());
+ return { 1, String() };
+ return { 0, answers[0].record_data() };
}
}