summaryrefslogtreecommitdiff
path: root/Kernel/Net/IPv4Socket.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-09 22:25:09 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-09 22:25:09 +0100
commitc67d550df116346733e6652aff47972a8dfadcc2 (patch)
treed3be34e39c0c33797707e2f1a4517344c29dd78d /Kernel/Net/IPv4Socket.cpp
parentb12734cf13593b1814ad7253bea5dac7e710cb3d (diff)
downloadserenity-c67d550df116346733e6652aff47972a8dfadcc2.zip
Kernel: Convert klog() => dmesgln() in IPv4Socket
Diffstat (limited to 'Kernel/Net/IPv4Socket.cpp')
-rw-r--r--Kernel/Net/IPv4Socket.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index 3313ea4e75..9baac7312e 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -203,7 +203,7 @@ KResultOr<size_t> IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer&
return EFAULT;
if (ia.sin_family != AF_INET) {
- klog() << "sendto: Bad address family: " << ia.sin_family << " is not AF_INET!";
+ dmesgln("sendto: Bad address family: {} is not AF_INET", ia.sin_family);
return EAFNOSUPPORT;
}
@@ -222,9 +222,7 @@ KResultOr<size_t> IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer&
if (rc < 0)
return rc;
-#if IPV4_SOCKET_DEBUG
- klog() << "sendto: destination=" << m_peer_address.to_string().characters() << ":" << m_peer_port;
-#endif
+ dbgln_if(IPV4_SOCKET_DEBUG, "sendto: destination={}:{}", m_peer_address, m_peer_port);
if (type() == SOCK_RAW) {
auto result = routing_decision.adapter->send_ipv4(routing_decision.next_hop, m_peer_address, (IPv4Protocol)protocol(), data, data_length, m_ttl);
@@ -364,9 +362,7 @@ KResultOr<size_t> IPv4Socket::recvfrom(FileDescription& description, UserOrKerne
return EINVAL;
}
-#if IPV4_SOCKET_DEBUG
- klog() << "recvfrom: type=" << type() << ", local_port=" << local_port();
-#endif
+ dbgln_if(IPV4_SOCKET_DEBUG, "recvfrom: type={}, local_port={}", type(), local_port());
KResultOr<size_t> nreceived = 0;
if (buffer_mode() == BufferMode::Bytes)