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/login/logind-dbus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/login') 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) { -- cgit v1.2.3-54-g00ecf