1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 01:07:44 +00:00

LookupServer: Replace unused 'did_timeout' with 'did_get_response'

did_timeout is a bool& parameter of lookup() that used to be set when
the UDP connection timed out, but this behaviour was broken in e335d73.
I replaced it with a more useful 'did_get_response' parameter that is
being set after the UDP socket connected, sent its request and got a
response - it might still be bogus data but we know the communication
was successful.
This commit is contained in:
Linus Groh 2020-10-25 15:07:31 +00:00 committed by Andreas Kling
parent 75864b5a85
commit 2440112d53
2 changed files with 11 additions and 10 deletions

View file

@ -42,7 +42,7 @@ public:
private:
void load_etc_hosts();
void service_client(RefPtr<Core::LocalSocket>);
Vector<String> lookup(const String& hostname, bool& did_timeout, unsigned short record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
Vector<String> lookup(const String& hostname, bool& did_get_response, unsigned short record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
struct CachedLookup {
DNSQuestion question;