From 0fc60e41dd06f2c47f1ba416e6eb1c08ee9024c4 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sun, 1 Mar 2020 21:45:39 +0200 Subject: 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(). --- Kernel/Net/UDPSocket.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Kernel/Net/UDPSocket.cpp') 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; } -- cgit v1.2.3