diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-29 18:58:30 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 08:18:43 +0100 |
commit | db9d657feb727d338d64b9a51cb25de6f20eeae4 (patch) | |
tree | c0d451cb03302383e07e854c1c4048c17b31e70f /src/login | |
parent | 81295bb5aced5d5350db11b0e9bb284e22d2ac37 (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/login')
-rw-r--r-- | src/login/logind-dbus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 7603b0ec7..1f5cf865b 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -428,7 +428,7 @@ static int method_list_sessions(sd_bus_message *message, void *userdata, sd_bus_ 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_users(sd_bus_message *message, void *userdata, sd_bus_error *error) { @@ -468,7 +468,7 @@ static int method_list_users(sd_bus_message *message, void *userdata, sd_bus_err 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_seats(sd_bus_message *message, void *userdata, sd_bus_error *error) { @@ -505,7 +505,7 @@ static int method_list_seats(sd_bus_message *message, void *userdata, sd_bus_err 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_inhibitors(sd_bus_message *message, void *userdata, sd_bus_error *error) { @@ -543,7 +543,7 @@ static int method_list_inhibitors(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); } static int method_create_session(sd_bus_message *message, void *userdata, sd_bus_error *error) { |