summaryrefslogtreecommitdiff
path: root/Kernel/Net/UDPSocket.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-03-01 21:45:39 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-02 22:23:39 +0100
commit0fc60e41dd06f2c47f1ba416e6eb1c08ee9024c4 (patch)
tree438f00be5f3af7ac6aa19cea647505f6527c7e9b /Kernel/Net/UDPSocket.cpp
parent19aa53e1f96745b1f3a90c94f8d24c92e68d4372 (diff)
downloadserenity-0fc60e41dd06f2c47f1ba416e6eb1c08ee9024c4.zip
Kernel: Use klog() instead of kprintf()
Also, duplicate data in dbg() and klog() calls were removed. In addition, leakage of virtual address to kernel log is prevented. This is done by replacing kprintf() calls to dbg() calls with the leaked data instead. Also, other kprintf() calls were replaced with klog().
Diffstat (limited to 'Kernel/Net/UDPSocket.cpp')
-rw-r--r--Kernel/Net/UDPSocket.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Kernel/Net/UDPSocket.cpp b/Kernel/Net/UDPSocket.cpp
index c3d02d8421..8794b9b7a6 100644
--- a/Kernel/Net/UDPSocket.cpp
+++ b/Kernel/Net/UDPSocket.cpp
@@ -101,11 +101,7 @@ int UDPSocket::protocol_send(const void* data, size_t data_length)
udp_packet.set_destination_port(peer_port());
udp_packet.set_length(sizeof(UDPPacket) + data_length);
memcpy(udp_packet.payload(), data, data_length);
- kprintf("sending as udp packet from %s:%u to %s:%u!\n",
- routing_decision.adapter->ipv4_address().to_string().characters(),
- local_port(),
- peer_address().to_string().characters(),
- peer_port());
+ klog() << "sending as udp packet from " << routing_decision.adapter->ipv4_address().to_string().characters() << ":" << local_port() << " to " << peer_address().to_string().characters() << ":" << peer_port() << "!";
routing_decision.adapter->send_ipv4(routing_decision.next_hop, peer_address(), IPv4Protocol::UDP, buffer.data(), buffer.size(), ttl());
return data_length;
}