summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/dbus.c6
-rw-r--r--src/resolve/resolved-bus.c6
-rw-r--r--src/resolve/resolved-dns-query.c4
-rw-r--r--src/resolve/resolved-dns-query.h2
4 files changed, 8 insertions, 10 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c
index d1843aa290..4005aac7e7 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -147,13 +147,11 @@ static int signal_activation_request(sd_bus_message *message, void *userdata, sd
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
Manager *m = userdata;
const char *name;
- sd_bus *bus;
Unit *u;
int r;
assert(message);
assert(m);
- assert_se(bus = sd_bus_message_get_bus(message));
r = sd_bus_message_read(message, "s", &name);
if (r < 0) {
@@ -189,7 +187,7 @@ failed:
log_debug("D-Bus activation failed for %s: %s", name, bus_error_message(&error, r));
- r = sd_bus_message_new_signal(bus, &reply, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Activator", "ActivationFailure");
+ r = sd_bus_message_new_signal(sd_bus_message_get_bus(message), &reply, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Activator", "ActivationFailure");
if (r < 0) {
bus_log_create_error(r);
return 0;
@@ -201,7 +199,7 @@ failed:
return 0;
}
- r = sd_bus_send_to(bus, reply, "org.freedesktop.DBus", NULL);
+ r = sd_bus_send_to(NULL, reply, "org.freedesktop.DBus", NULL);
if (r < 0)
return log_error_errno(r, "Failed to respond with to bus activation request: %m");
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index 0ea585e197..171141e3a4 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -339,7 +339,7 @@ static int bus_method_resolve_hostname(sd_bus_message *message, void *userdata,
q->request_hostname = hostname;
q->complete = bus_method_resolve_hostname_complete;
- r = dns_query_bus_track(q, sd_bus_message_get_bus(message), message);
+ r = dns_query_bus_track(q, message);
if (r < 0)
return r;
@@ -491,7 +491,7 @@ static int bus_method_resolve_address(sd_bus_message *message, void *userdata, s
memcpy(&q->request_address, d, sz);
q->complete = bus_method_resolve_address_complete;
- r = dns_query_bus_track(q, sd_bus_message_get_bus(message), message);
+ r = dns_query_bus_track(q, message);
if (r < 0)
return r;
@@ -643,7 +643,7 @@ static int bus_method_resolve_record(sd_bus_message *message, void *userdata, sd
q->request_hostname = name;
q->complete = bus_method_resolve_record_complete;
- r = dns_query_bus_track(q, sd_bus_message_get_bus(message), message);
+ r = dns_query_bus_track(q, message);
if (r < 0)
return r;
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c
index d619fae725..418d9721ef 100644
--- a/src/resolve/resolved-dns-query.c
+++ b/src/resolve/resolved-dns-query.c
@@ -467,14 +467,14 @@ static int on_bus_track(sd_bus_track *t, void *userdata) {
return 0;
}
-int dns_query_bus_track(DnsQuery *q, sd_bus *bus, sd_bus_message *m) {
+int dns_query_bus_track(DnsQuery *q, sd_bus_message *m) {
int r;
assert(q);
assert(m);
if (!q->bus_track) {
- r = sd_bus_track_new(bus, &q->bus_track, on_bus_track, q);
+ r = sd_bus_track_new(sd_bus_message_get_bus(m), &q->bus_track, on_bus_track, q);
if (r < 0)
return r;
}
diff --git a/src/resolve/resolved-dns-query.h b/src/resolve/resolved-dns-query.h
index 788992e679..5a319f0a62 100644
--- a/src/resolve/resolved-dns-query.h
+++ b/src/resolve/resolved-dns-query.h
@@ -75,6 +75,6 @@ void dns_query_ready(DnsQuery *q);
int dns_query_cname_redirect(DnsQuery *q, const char *name);
-int dns_query_bus_track(DnsQuery *q, sd_bus *bus, sd_bus_message *m);
+int dns_query_bus_track(DnsQuery *q, sd_bus_message *m);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuery*, dns_query_free);