From 9030ca462bd13cd6536299814e4a71d5c5e85be9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 29 Apr 2015 18:58:30 +0200 Subject: sd-bus: allow passing NULL as bus parameter to sd_bus_send() If NULL is specified for the bus it is now automatically derived from the passed in message. This commit also changes a number of invocations of sd_bus_send() to make use of this. --- src/machine/machined-dbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/machine/machined-dbus.c') diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 5036a63985..0e971a6789 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -255,7 +255,7 @@ static int method_list_machines(sd_bus_message *message, void *userdata, sd_bus_ if (r < 0) return sd_bus_error_set_errno(error, r); - return sd_bus_send(sd_bus_message_get_bus(message), reply, NULL); + return sd_bus_send(NULL, reply, NULL); } static int method_create_or_register_machine(Manager *manager, sd_bus_message *message, bool read_network, Machine **_m, sd_bus_error *error) { @@ -593,7 +593,7 @@ static int method_list_images(sd_bus_message *message, void *userdata, sd_bus_er if (r < 0) return r; - return sd_bus_send(sd_bus_message_get_bus(message), reply, NULL); + return sd_bus_send(NULL, reply, NULL); } static int method_open_machine_pty(sd_bus_message *message, void *userdata, sd_bus_error *error) { -- cgit v1.2.3-54-g00ecf