summaryrefslogtreecommitdiff
path: root/src/core/dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/dbus.c')
-rw-r--r--src/core/dbus.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c
index 43b2ccd64e..8d72502a1a 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -71,12 +71,11 @@ int bus_send_queued_message(Manager *m) {
return 0;
}
-static int signal_agent_released(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int signal_agent_released(sd_bus_message *message, void *userdata, sd_bus_error *error) {
Manager *m = userdata;
const char *cgroup;
int r;
- assert(bus);
assert(message);
assert(m);
@@ -104,12 +103,13 @@ exit:
return 0;
}
-static int signal_disconnected(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int signal_disconnected(sd_bus_message *message, void *userdata, sd_bus_error *error) {
Manager *m = userdata;
+ sd_bus *bus;
- assert(bus);
assert(message);
assert(m);
+ assert_se(bus = sd_bus_message_get_bus(message));
if (bus == m->api_bus)
destroy_bus(m, &m->api_bus);
@@ -123,12 +123,11 @@ static int signal_disconnected(sd_bus *bus, sd_bus_message *message, void *userd
return 0;
}
-static int signal_name_owner_changed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int signal_name_owner_changed(sd_bus_message *message, void *userdata, sd_bus_error *error) {
const char *name, *old_owner, *new_owner;
Manager *m = userdata;
int r;
- assert(bus);
assert(message);
assert(m);
@@ -146,17 +145,18 @@ static int signal_name_owner_changed(sd_bus *bus, sd_bus_message *message, void
return 0;
}
-static int signal_activation_request(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *ret_error) {
+static int signal_activation_request(sd_bus_message *message, void *userdata, sd_bus_error *ret_error) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
Manager *m = userdata;
const char *name;
+ sd_bus *bus;
Unit *u;
int r;
- assert(bus);
assert(message);
assert(m);
+ assert_se(bus = sd_bus_message_get_bus(message));
r = sd_bus_message_read(message, "s", &name);
if (r < 0) {
@@ -212,14 +212,13 @@ failed:
}
#ifdef HAVE_SELINUX
-static int mac_selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int mac_selinux_filter(sd_bus_message *message, void *userdata, sd_bus_error *error) {
Manager *m = userdata;
const char *verb, *path;
Unit *u = NULL;
Job *j;
int r;
- assert(bus);
assert(message);
/* Our own method calls are all protected individually with