[systemd-commits] src/socket.c
Kay Sievers
kay at kemper.freedesktop.org
Fri May 20 09:43:49 PDT 2011
src/socket.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit b8cef44e40652e166610b0da031a9c0b13032407
Author: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri May 20 18:41:44 2011 +0200
socket: always use SO_{RCV,SND}BUFFORCE to allow larger values
diff --git a/src/socket.c b/src/socket.c
index 1020c94..c013958 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -663,14 +663,14 @@ static void socket_apply_socket_options(Socket *s, int fd) {
if (s->receive_buffer > 0) {
int value = (int) s->receive_buffer;
- if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value)) < 0)
- log_warning("SO_RCVBUF failed: %m");
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &value, sizeof(value)) < 0)
+ log_warning("SO_RCVBUFFORCE failed: %m");
}
if (s->send_buffer > 0) {
int value = (int) s->send_buffer;
- if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &value, sizeof(value)) < 0)
- log_warning("SO_SNDBUF failed: %m");
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, &value, sizeof(value)) < 0)
+ log_warning("SO_SNDBUFFORCE failed: %m");
}
if (s->mark >= 0)
More information about the systemd-commits
mailing list