diff options
Diffstat (limited to 'Userland/Libraries/LibDNS/Packet.cpp')
-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())); |