summaryrefslogtreecommitdiff
path: root/Kernel/Net/TCPSocket.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-02-07 15:33:24 +0330
committerAndreas Kling <kling@serenityos.org>2021-02-08 18:08:55 +0100
commit09a43969ba957b3484cc9387344fea145f46aa46 (patch)
tree0e2077e1d8af02b06e39cb4ca6cbfcba37052c73 /Kernel/Net/TCPSocket.cpp
parent1f8a633cc762fc3ca8544ee75ce25a7a8860d4be (diff)
downloadserenity-09a43969ba957b3484cc9387344fea145f46aa46.zip
Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
Diffstat (limited to 'Kernel/Net/TCPSocket.cpp')
-rw-r--r--Kernel/Net/TCPSocket.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index 602d7d4ab0..e0dfa1da02 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -47,7 +47,7 @@ void TCPSocket::for_each(Function<void(const TCPSocket&)> callback)
void TCPSocket::set_state(State new_state)
{
- dbgln<TCP_SOCKET_DEBUG>("TCPSocket({}) state moving from {} to {}", this, to_string(m_state), to_string(new_state));
+ dbgln_if(TCP_SOCKET_DEBUG, "TCPSocket({}) state moving from {} to {}", this, to_string(m_state), to_string(new_state));
auto was_disconnected = protocol_is_disconnected();
auto previous_role = m_role;
@@ -154,7 +154,7 @@ TCPSocket::~TCPSocket()
LOCKER(sockets_by_tuple().lock());
sockets_by_tuple().resource().remove(tuple());
- dbgln<TCP_SOCKET_DEBUG>("~TCPSocket in state {}", to_string(state()));
+ dbgln_if(TCP_SOCKET_DEBUG, "~TCPSocket in state {}", to_string(state()));
}
NonnullRefPtr<TCPSocket> TCPSocket::create(int protocol)
@@ -273,14 +273,14 @@ void TCPSocket::receive_tcp_packet(const TCPPacket& packet, u16 size)
if (packet.has_ack()) {
u32 ack_number = packet.ack_number();
- dbgln<TCP_SOCKET_DEBUG>("TCPSocket: receive_tcp_packet: {}", ack_number);
+ dbgln_if(TCP_SOCKET_DEBUG, "TCPSocket: receive_tcp_packet: {}", ack_number);
int removed = 0;
LOCKER(m_not_acked_lock);
while (!m_not_acked.is_empty()) {
auto& packet = m_not_acked.first();
- dbgln<TCP_SOCKET_DEBUG>("TCPSocket: iterate: {}", packet.ack_number);
+ dbgln_if(TCP_SOCKET_DEBUG, "TCPSocket: iterate: {}", packet.ack_number);
if (packet.ack_number <= ack_number) {
m_not_acked.take_first();
@@ -290,7 +290,7 @@ void TCPSocket::receive_tcp_packet(const TCPPacket& packet, u16 size)
}
}
- dbgln<TCP_SOCKET_DEBUG>("TCPSocket: receive_tcp_packet acknowledged {} packets", removed);
+ dbgln_if(TCP_SOCKET_DEBUG, "TCPSocket: receive_tcp_packet acknowledged {} packets", removed);
}
m_packets_in++;