diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn.c | 9 | ||||
-rw-r--r-- | src/resolve/test-dnssec-complex.c | 17 |
2 files changed, 5 insertions, 21 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 5d49e05064..74b15dcb44 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -30,6 +30,7 @@ #include "btrfs-util.h" #include "build.h" #include "bus-error.h" +#include "bus-locator.h" #include "bus-util.h" #include "cap-list.h" #include "capability-util.h" @@ -2092,13 +2093,7 @@ static int resolved_listening(void) { if (r == 0) return 0; - r = sd_bus_get_property_string(bus, - "org.freedesktop.resolve1", - "/org/freedesktop/resolve1", - "org.freedesktop.resolve1.Manager", - "DNSStubListener", - &error, - &dns_stub_listener_mode); + r = bus_get_property_string(bus, bus_resolve_mgr, "DNSStubListener", &error, &dns_stub_listener_mode); if (r < 0) return log_debug_errno(r, "Failed to query DNSStubListener property: %s", bus_error_message(&error, r)); diff --git a/src/resolve/test-dnssec-complex.c b/src/resolve/test-dnssec-complex.c index d8aeb7061f..976d197bb4 100644 --- a/src/resolve/test-dnssec-complex.c +++ b/src/resolve/test-dnssec-complex.c @@ -7,6 +7,7 @@ #include "af-list.h" #include "alloc-util.h" #include "bus-common-errors.h" +#include "bus-locator.h" #include "dns-type.h" #include "random-util.h" #include "resolved-def.h" @@ -46,13 +47,7 @@ static void test_rr_lookup(sd_bus *bus, const char *name, uint16_t type, const c name = m; } - assert_se(sd_bus_message_new_method_call( - bus, - &req, - "org.freedesktop.resolve1", - "/org/freedesktop/resolve1", - "org.freedesktop.resolve1.Manager", - "ResolveRecord") >= 0); + assert_se(bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveRecord") >= 0); assert_se(sd_bus_message_append(req, "isqqt", 0, name, DNS_CLASS_IN, type, UINT64_C(0)) >= 0); @@ -83,13 +78,7 @@ static void test_hostname_lookup(sd_bus *bus, const char *name, int family, cons name = m; } - assert_se(sd_bus_message_new_method_call( - bus, - &req, - "org.freedesktop.resolve1", - "/org/freedesktop/resolve1", - "org.freedesktop.resolve1.Manager", - "ResolveHostname") >= 0); + assert_se(bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveHostname") >= 0); assert_se(sd_bus_message_append(req, "isit", 0, name, family, UINT64_C(0)) >= 0); |