mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
Kernel: Use a more detailed state machine for socket setup
This commit is contained in:
parent
638008da13
commit
bd6d2c0819
8 changed files with 64 additions and 11 deletions
|
@ -2313,7 +2313,7 @@ int Process::sys$getpeername(int sockfd, sockaddr* addr, socklen_t* addrlen)
|
|||
|
||||
auto& socket = *description->socket();
|
||||
|
||||
if (!socket.is_connected())
|
||||
if (socket.setup_state() != Socket::SetupState::Completed)
|
||||
return -ENOTCONN;
|
||||
|
||||
if (!socket.get_peer_address(addr, addrlen))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue