mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:48:11 +00:00
Kernel: Convert klog() => dmesgln() in IPv4Socket
This commit is contained in:
parent
b12734cf13
commit
c67d550df1
1 changed files with 3 additions and 7 deletions
|
@ -203,7 +203,7 @@ KResultOr<size_t> IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer&
|
||||||
return EFAULT;
|
return EFAULT;
|
||||||
|
|
||||||
if (ia.sin_family != AF_INET) {
|
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;
|
return EAFNOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,9 +222,7 @@ KResultOr<size_t> IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer&
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
#if IPV4_SOCKET_DEBUG
|
dbgln_if(IPV4_SOCKET_DEBUG, "sendto: destination={}:{}", m_peer_address, m_peer_port);
|
||||||
klog() << "sendto: destination=" << m_peer_address.to_string().characters() << ":" << m_peer_port;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (type() == SOCK_RAW) {
|
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);
|
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;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if IPV4_SOCKET_DEBUG
|
dbgln_if(IPV4_SOCKET_DEBUG, "recvfrom: type={}, local_port={}", type(), local_port());
|
||||||
klog() << "recvfrom: type=" << type() << ", local_port=" << local_port();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
KResultOr<size_t> nreceived = 0;
|
KResultOr<size_t> nreceived = 0;
|
||||||
if (buffer_mode() == BufferMode::Bytes)
|
if (buffer_mode() == BufferMode::Bytes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue