1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 03:15:07 +00:00

IPv4Socket: Use dbg() instead of dbgprintf()

This commit is contained in:
Liav A 2020-02-24 14:40:46 +02:00 committed by Andreas Kling
parent 4432bf41f6
commit d6ae2cf46a

View file

@ -122,7 +122,7 @@ KResult IPv4Socket::bind(const sockaddr* user_address, socklen_t address_size)
m_local_port = requested_local_port; m_local_port = requested_local_port;
#ifdef IPV4_SOCKET_DEBUG #ifdef IPV4_SOCKET_DEBUG
dbgprintf("IPv4Socket::bind %s{%p} to %s:%u\n", class_name(), this, m_local_address.to_string().characters(), m_local_port); dbg() << "IPv4Socket::bind " << class_name() << "{" << this << "} to " << m_local_address.to_string().characters() << ":" << m_local_port;
#endif #endif
return protocol_bind(); return protocol_bind();
@ -316,7 +316,7 @@ ssize_t IPv4Socket::receive_packet_buffered(FileDescription& description, void*
if (addr) { if (addr) {
#ifdef IPV4_SOCKET_DEBUG #ifdef IPV4_SOCKET_DEBUG
dbgprintf("Incoming packet is from: %s:%u\n", packet.peer_address.to_string().characters(), packet.peer_port); dbg() << "Incoming packet is from: " << packet.peer_address.to_string().characters() << ":" << packet.peer_port;
#endif #endif
auto& ia = *(sockaddr_in*)addr; auto& ia = *(sockaddr_in*)addr;
memcpy(&ia.sin_addr, &packet.peer_address, sizeof(IPv4Address)); memcpy(&ia.sin_addr, &packet.peer_address, sizeof(IPv4Address));