1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:07:35 +00:00

LookupServer: Propagate the errors from MulticastDNS::lookup()

This patch slightly change the signature of lookup() method
and propagates all the errors to the caller with help of ErrorOr.
This commit is contained in:
Alexander Narsudinov 2022-12-18 00:50:14 +03:00 committed by Andreas Kling
parent 767529ebf5
commit e279a1723b
3 changed files with 13 additions and 18 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Sergey Bugaev <bugaevc@serenityos.org>
* Copyright (c) 2022, Alexander Narsudinov <a.narsudinov@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,7 +21,7 @@ using namespace DNS;
class MulticastDNS : public Core::UDPServer {
C_OBJECT(MulticastDNS)
public:
Vector<Answer> lookup(Name const&, RecordType record_type);
ErrorOr<Vector<Answer>> lookup(Name const&, RecordType record_type);
private:
explicit MulticastDNS(Object* parent = nullptr);