mirror of
https://review.haiku-os.org/haiku
synced 2025-01-22 06:16:03 +01:00
setsockopt() now understands all boolead options.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18475 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5b4cb10932
commit
943cedf784
@ -478,6 +478,23 @@ socket_setsockopt(net_socket *socket, int level, int option, const void *value,
|
||||
socket->receive.buffer_size = *(const uint32 *)value;
|
||||
return B_OK;
|
||||
|
||||
case SO_BROADCAST:
|
||||
case SO_DEBUG:
|
||||
case SO_DONTROUTE:
|
||||
case SO_KEEPALIVE:
|
||||
case SO_OOBINLINE:
|
||||
case SO_REUSEADDR:
|
||||
case SO_REUSEPORT:
|
||||
case SO_USELOOPBACK:
|
||||
if (length != sizeof(int32))
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if (*(const int32 *)value)
|
||||
socket->options |= option;
|
||||
else
|
||||
socket->options &= ~option;
|
||||
return B_OK;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user