1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Kernel: Put some network log messages behind debug flags

This commit is contained in:
Conrad Pankoff 2019-09-08 19:13:50 +10:00 committed by Andreas Kling
parent 328d52b323
commit a2b61e30c5
3 changed files with 12 additions and 0 deletions

View file

@ -219,13 +219,17 @@ void TCPSocket::receive_tcp_packet(const TCPPacket& packet, u16 size)
if (packet.has_ack()) {
u32 ack_number = packet.ack_number();
#ifdef TCP_SOCKET_DEBUG
dbg() << "TCPSocket: receive_tcp_packet: " << ack_number;
#endif
int removed = 0;
while (!m_not_acked.is_empty()) {
auto& packet = m_not_acked.first();
#ifdef TCP_SOCKET_DEBUG
dbg() << "TCPSocket: iterate: " << packet.ack_number;
#endif
if (packet.ack_number <= ack_number) {
m_not_acked.take_first();
@ -235,7 +239,9 @@ void TCPSocket::receive_tcp_packet(const TCPPacket& packet, u16 size)
}
}
#ifdef TCP_SOCKET_DEBUG
dbg() << "TCPSocket: receive_tcp_packet acknowledged " << removed << " packets";
#endif
}
m_packets_in++;