summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-server.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-31 19:10:49 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-01 03:29:29 +0200
commite82c950997fd1c8f7eb1cea881cb35387321af3d (patch)
tree09f796de2e0211490c0f9b0482300a1a2f17dd66 /src/libsystemd-bus/test-bus-server.c
parent7989e1f2d79891ff73dea0ede1c98c47b62547db (diff)
bus: allow two different fds for input/output in sd_bus_set_fd()
This is useful so that we can speak D-Bus over a FIFO pair such as stdin+stdout.
Diffstat (limited to 'src/libsystemd-bus/test-bus-server.c')
-rw-r--r--src/libsystemd-bus/test-bus-server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-bus/test-bus-server.c b/src/libsystemd-bus/test-bus-server.c
index 2cb4157498..a594ce3157 100644
--- a/src/libsystemd-bus/test-bus-server.c
+++ b/src/libsystemd-bus/test-bus-server.c
@@ -53,7 +53,7 @@ static void *server(void *p) {
assert_se(sd_id128_randomize(&id) >= 0);
assert_se(sd_bus_new(&bus) >= 0);
- assert_se(sd_bus_set_fd(bus, c->fds[0]) >= 0);
+ assert_se(sd_bus_set_fd(bus, c->fds[0], c->fds[0]) >= 0);
assert_se(sd_bus_set_server(bus, 1, id) >= 0);
assert_se(sd_bus_set_negotiate_fds(bus, c->server_negotiate_unix_fds) >= 0);
assert_se(sd_bus_set_anonymous(bus, c->server_anonymous_auth) >= 0);
@@ -132,7 +132,7 @@ static int client(struct context *c) {
int r;
assert_se(sd_bus_new(&bus) >= 0);
- assert_se(sd_bus_set_fd(bus, c->fds[1]) >= 0);
+ assert_se(sd_bus_set_fd(bus, c->fds[1], c->fds[1]) >= 0);
assert_se(sd_bus_set_negotiate_fds(bus, c->client_negotiate_unix_fds) >= 0);
assert_se(sd_bus_set_anonymous(bus, c->client_anonymous_auth) >= 0);
assert_se(sd_bus_start(bus) >= 0);