diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-01-19 21:52:21 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-24 12:47:39 +0000 |
commit | 6972e98efafd9c21e6ceea3ff07b8b57c6a9e128 (patch) | |
tree | 7a1d6002bcf3767ab8ad7c6f909755e3cc6ce336 /Userland | |
parent | 6ccda76a7161a705aa83d35da970f10807728cd6 (diff) | |
download | serenity-6972e98efafd9c21e6ceea3ff07b8b57c6a9e128.zip |
LibDNS: Pass `write_to_stream` calls through `write_value` instead
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibDNS/Packet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibDNS/Packet.cpp b/Userland/Libraries/LibDNS/Packet.cpp index 6289ae974e..b79fc7b2f1 100644 --- a/Userland/Libraries/LibDNS/Packet.cpp +++ b/Userland/Libraries/LibDNS/Packet.cpp @@ -53,19 +53,19 @@ ErrorOr<ByteBuffer> Packet::to_byte_buffer() const TRY(stream.write_value(header)); for (auto& question : m_questions) { - TRY(question.name().write_to_stream(stream)); + TRY(stream.write_value(question.name())); TRY(stream.write_value(htons((u16)question.record_type()))); TRY(stream.write_value(htons(question.raw_class_code()))); } for (auto& answer : m_answers) { - TRY(answer.name().write_to_stream(stream)); + TRY(stream.write_value(answer.name())); TRY(stream.write_value(htons((u16)answer.type()))); TRY(stream.write_value(htons(answer.raw_class_code()))); TRY(stream.write_value(htonl(answer.ttl()))); if (answer.type() == RecordType::PTR) { Name name { answer.record_data() }; TRY(stream.write_value(htons(name.serialized_size()))); - TRY(name.write_to_stream(stream)); + TRY(stream.write_value(name)); } else { TRY(stream.write_value(htons(answer.record_data().length()))); TRY(stream.write_entire_buffer(answer.record_data().bytes())); |