summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-05-03 08:23:50 +0200
committerVito Caputo <vcaputo@pengaru.com>2020-05-07 17:46:44 +0200
commita63d7e7bf646c6cdca8c7289152522bab37c4cd5 (patch)
tree2198f7168aa4d1125200683963b8929bef15c960
parentnss-mymachines: switch to BusLocator-oriented helpers (diff)
downloadsystemd-a63d7e7bf646c6cdca8c7289152522bab37c4cd5.tar.xz
systemd-a63d7e7bf646c6cdca8c7289152522bab37c4cd5.zip
nss-resolve: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
-rw-r--r--src/nss-resolve/nss-resolve.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index de46a8d469..0ee3ddd843 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -10,6 +10,7 @@
#include "sd-bus.h"
#include "bus-common-errors.h"
+#include "bus-util.h"
#include "errno-util.h"
#include "in-addr-util.h"
#include "macro.h"
@@ -142,13 +143,7 @@ enum nss_status _nss_resolve_gethostbyname4_r(
if (r < 0)
goto fail;
- r = sd_bus_message_new_method_call(
- bus,
- &req,
- "org.freedesktop.resolve1",
- "/org/freedesktop/resolve1",
- "org.freedesktop.resolve1.Manager",
- "ResolveHostname");
+ r = bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveHostname");
if (r < 0)
goto fail;
@@ -322,13 +317,7 @@ enum nss_status _nss_resolve_gethostbyname3_r(
if (r < 0)
goto fail;
- r = sd_bus_message_new_method_call(
- bus,
- &req,
- "org.freedesktop.resolve1",
- "/org/freedesktop/resolve1",
- "org.freedesktop.resolve1.Manager",
- "ResolveHostname");
+ r = bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveHostname");
if (r < 0)
goto fail;
@@ -514,13 +503,7 @@ enum nss_status _nss_resolve_gethostbyaddr2_r(
if (r < 0)
goto fail;
- r = sd_bus_message_new_method_call(
- bus,
- &req,
- "org.freedesktop.resolve1",
- "/org/freedesktop/resolve1",
- "org.freedesktop.resolve1.Manager",
- "ResolveAddress");
+ r = bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveAddress");
if (r < 0)
goto fail;