summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-10 15:17:54 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-11 11:55:47 +0100
commitdca6f1f49b30b462d37440092e50a1a381b7cd2a (patch)
tree0822c3c3edaaf626a3f6a7e6e16c81df1a06aaa0 /Kernel/Net
parent872f2a3b90852c5211e68e7c73f871585576a3f8 (diff)
downloadserenity-dca6f1f49b30b462d37440092e50a1a381b7cd2a.zip
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything:
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/IPv4Socket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index 5c9ba42b68..f8c6a3ac2b 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -114,7 +114,7 @@ KResult IPv4Socket::bind(Userspace<const sockaddr*> user_address, socklen_t addr
auto requested_local_port = ntohs(address.sin_port);
if (!Process::current()->is_superuser()) {
if (requested_local_port < 1024) {
- dbg() << "UID " << Process::current()->uid() << " attempted to bind " << class_name() << " to port " << requested_local_port;
+ dbgln("UID {} attempted to bind {} to port {}", Process::current()->uid(), class_name(), requested_local_port);
return KResult(-EACCES);
}
}
@@ -300,7 +300,7 @@ KResultOr<size_t> IPv4Socket::receive_packet_buffered(FileDescription& descripti
}
if (!packet.data.has_value()) {
if (protocol_is_disconnected()) {
- dbg() << "IPv4Socket{" << this << "} is protocol-disconnected, returning 0 in recvfrom!";
+ dbgln("IPv4Socket({}) is protocol-disconnected, returning 0 in recvfrom!", this);
return 0;
}
@@ -394,7 +394,7 @@ bool IPv4Socket::did_receive(const IPv4Address& source_address, u16 source_port,
if (buffer_mode() == BufferMode::Bytes) {
size_t space_in_receive_buffer = m_receive_buffer.space_for_writing();
if (packet_size > space_in_receive_buffer) {
- dbg() << "IPv4Socket(" << this << "): did_receive refusing packet since buffer is full.";
+ dbgln("IPv4Socket({}): did_receive refusing packet since buffer is full.", this);
ASSERT(m_can_read);
return false;
}
@@ -408,7 +408,7 @@ bool IPv4Socket::did_receive(const IPv4Address& source_address, u16 source_port,
set_can_read(!m_receive_buffer.is_empty());
} else {
if (m_receive_queue.size() > 2000) {
- dbg() << "IPv4Socket(" << this << "): did_receive refusing packet since queue is full.";
+ dbgln("IPv4Socket({}): did_receive refusing packet since queue is full.", this);
return false;
}
m_receive_queue.append({ source_address, source_port, packet_timestamp, move(packet) });