mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:38:13 +00:00
Kernel: recvfrom() should treat the address arguments as outparams.
This commit is contained in:
parent
b59d588c04
commit
19a51132f5
10 changed files with 32 additions and 28 deletions
|
@ -89,7 +89,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
for (;;) {
|
||||
rc = recvfrom(fd, &pong_packet, sizeof(PingPacket), 0, (const struct sockaddr*)&peer_address, sizeof(sockaddr_in));
|
||||
socklen_t peer_address_size = sizeof(peer_address);
|
||||
rc = recvfrom(fd, &pong_packet, sizeof(PingPacket), 0, (struct sockaddr*)&peer_address, &peer_address_size);
|
||||
if (rc < 0) {
|
||||
if (errno == EAGAIN) {
|
||||
printf("Request (seq=%u) timed out.\n", ntohs(ping_packet.header.un.echo.sequence));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue