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/core/dbus-manager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 5fb0da2cb2..632529fcbc 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -916,7 +916,7 @@ static int list_units_filtered(sd_bus_message *message, void *userdata, sd_bus_e if (r < 0) return r; - return sd_bus_send(sd_bus_message_get_bus(reply), reply, NULL); + return sd_bus_send(NULL, reply, NULL); } static int method_list_units(sd_bus_message *message, void *userdata, sd_bus_error *error) { @@ -985,7 +985,7 @@ static int method_list_jobs(sd_bus_message *message, void *userdata, sd_bus_erro if (r < 0) return r; - return sd_bus_send(sd_bus_message_get_bus(reply), reply, NULL); + return sd_bus_send(NULL, reply, NULL); } static int method_subscribe(sd_bus_message *message, void *userdata, sd_bus_error *error) { @@ -1502,7 +1502,7 @@ static int method_list_unit_files(sd_bus_message *message, void *userdata, sd_bu if (r < 0) return r; - return sd_bus_send(sd_bus_message_get_bus(reply), reply, NULL); + return sd_bus_send(NULL, reply, NULL); fail: unit_file_list_free(h); @@ -1620,7 +1620,7 @@ static int reply_unit_file_changes_and_free( if (r < 0) goto fail; - return sd_bus_send(sd_bus_message_get_bus(message), reply, NULL); + return sd_bus_send(NULL, reply, NULL); fail: unit_file_changes_free(changes, n_changes); -- cgit v1.2.3-54-g00ecf