summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-16 17:05:51 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-16 17:05:51 +0100
commitaec6d91fb76ee55bb1f200cc4489c89072e656d5 (patch)
tree4818a7f5da8efee1184066cbe5e3fa532185e8c1
parent10e4e52be8246fde0835212125ef97fea962df1b (diff)
bus: increase the bus socket buffer to 8 MB similar, to the log socket buffers
-rw-r--r--src/libsystemd-bus/bus-socket.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-socket.c b/src/libsystemd-bus/bus-socket.c
index 1365092d73..a7eaf5099d 100644
--- a/src/libsystemd-bus/bus-socket.c
+++ b/src/libsystemd-bus/bus-socket.c
@@ -38,6 +38,8 @@
#include "bus-internal.h"
#include "bus-message.h"
+#define SNDBUF_SIZE (8*1024*1024)
+
static void iovec_advance(struct iovec iov[], unsigned *idx, size_t size) {
while (size > 0) {
@@ -614,9 +616,9 @@ int bus_socket_setup(sd_bus *b) {
enable = !b->bus_client && (b->attach_flags & KDBUS_ATTACH_SECLABEL);
setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable));
- /* Increase the buffers to a MB */
- fd_inc_rcvbuf(b->input_fd, 1024*1024);
- fd_inc_sndbuf(b->output_fd, 1024*1024);
+ /* Increase the buffers to 8 MB */
+ fd_inc_rcvbuf(b->input_fd, SNDBUF_SIZE);
+ fd_inc_sndbuf(b->output_fd, SNDBUF_SIZE);
/* Get the peer for socketpair() sockets */
l = sizeof(b->ucred);