diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-29 18:58:30 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-29 18:58:30 +0200 |
commit | 9030ca462bd13cd6536299814e4a71d5c5e85be9 (patch) | |
tree | 43716aa3042f274b4578799725cfb03c5682e9d8 /src/core/dbus-manager.c | |
parent | 47ee3ee03483efd271642d5043070cbd171f19d4 (diff) |
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.
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r-- | src/core/dbus-manager.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |