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/login | |
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/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 7603b0ec72..1f5cf865b1 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) { |