mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
Kernel: Fix getsockopt(SO_RCVTIMEO) returning wrong timeout
We were returning the send timeout for both SO_RCVTIMEO and SO_SNDTIMEO.
This commit is contained in:
parent
c175cea32d
commit
9c7659306a
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ ErrorOr<void> Socket::getsockopt(OpenFileDescription&, int level, int option, Us
|
||||||
if (size < sizeof(timeval))
|
if (size < sizeof(timeval))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
{
|
{
|
||||||
timeval tv = m_send_timeout.to_timeval();
|
timeval tv = m_receive_timeout.to_timeval();
|
||||||
TRY(copy_to_user(static_ptr_cast<timeval*>(value), &tv));
|
TRY(copy_to_user(static_ptr_cast<timeval*>(value), &tv));
|
||||||
}
|
}
|
||||||
size = sizeof(timeval);
|
size = sizeof(timeval);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue