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

LibTLS: Put some debug spam behind an #ifdef

This commit is contained in:
Andreas Kling 2020-05-03 14:28:40 +02:00
parent 7f41a1adda
commit e7abbc6655

View file

@ -442,14 +442,19 @@ void TLSv12::consume(const ByteBuffer& record)
while (buffer_length >= 5) {
auto length = convert_between_host_and_network(*(u16*)m_context.message_buffer.offset_pointer(index + size_offset)) + header_size;
if (length > buffer_length) {
#ifdef TLS_DEBUG
dbg() << "Need more data: " << length << " | " << buffer_length;
#endif
break;
}
auto consumed = handle_message(m_context.message_buffer.slice_view(index, length));
#ifdef TLS_DEBUG
if (consumed > 0)
dbg() << "consumed " << (size_t)consumed << " bytes";
else
dbg() << "error: " << (int)consumed;
#endif
if (consumed != (i8)Error::NeedMoreData) {
if (consumed < 0) {