summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-29 18:58:30 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-29 18:58:30 +0200
commit9030ca462bd13cd6536299814e4a71d5c5e85be9 (patch)
tree43716aa3042f274b4578799725cfb03c5682e9d8 /src/machine
parent47ee3ee03483efd271642d5043070cbd171f19d4 (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/machine')
-rw-r--r--src/machine/machine-dbus.c8
-rw-r--r--src/machine/machined-dbus.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 4e73467b06..0892479a9a 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -335,7 +335,7 @@ int bus_machine_method_get_addresses(sd_bus_message *message, void *userdata, sd
if (r < 0)
return r;
- return sd_bus_send(sd_bus_message_get_bus(reply), reply, NULL);
+ return sd_bus_send(NULL, reply, NULL);
}
int bus_machine_method_get_os_release(sd_bus_message *message, void *userdata, sd_bus_error *error) {
@@ -426,7 +426,7 @@ int bus_machine_method_get_os_release(sd_bus_message *message, void *userdata, s
if (r < 0)
return r;
- return sd_bus_send(sd_bus_message_get_bus(reply), reply, NULL);
+ return sd_bus_send(NULL, reply, NULL);
}
int bus_machine_method_open_pty(sd_bus_message *message, void *userdata, sd_bus_error *error) {
@@ -458,7 +458,7 @@ int bus_machine_method_open_pty(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);
}
int bus_machine_method_open_login(sd_bus_message *message, void *userdata, sd_bus_error *error) {
@@ -551,7 +551,7 @@ int bus_machine_method_open_login(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);
}
int bus_machine_method_bind_mount(sd_bus_message *message, void *userdata, sd_bus_error *error) {
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index 5036a63985..0e971a6789 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -255,7 +255,7 @@ static int method_list_machines(sd_bus_message *message, void *userdata, sd_bus_
if (r < 0)
return sd_bus_error_set_errno(error, r);
- return sd_bus_send(sd_bus_message_get_bus(message), reply, NULL);
+ return sd_bus_send(NULL, reply, NULL);
}
static int method_create_or_register_machine(Manager *manager, sd_bus_message *message, bool read_network, Machine **_m, sd_bus_error *error) {
@@ -593,7 +593,7 @@ static int method_list_images(sd_bus_message *message, void *userdata, sd_bus_er
if (r < 0)
return r;
- return sd_bus_send(sd_bus_message_get_bus(message), reply, NULL);
+ return sd_bus_send(NULL, reply, NULL);
}
static int method_open_machine_pty(sd_bus_message *message, void *userdata, sd_bus_error *error) {