summaryrefslogtreecommitdiffstats
path: root/src/hostname
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-18 22:10:11 +0100
committerLennart Poettering <lennart@poettering.net>2018-01-05 13:58:32 +0100
commit0c0b9306470baa9498900bc7b46149d4a9d06738 (patch)
treebaf2afd39d5430f188bbb695e31fbd6b8ce1a809 /src/hostname
parentsd-bus: when disconnecting a slot, also reset its memory (diff)
downloadsystemd-0c0b9306470baa9498900bc7b46149d4a9d06738.tar.xz
systemd-0c0b9306470baa9498900bc7b46149d4a9d06738.zip
tree-wide: make name requesting asynchronous in all our services
This optimizes service startup a bit, and makes it less prone to deadlocks.
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 5feaa60c99..1c8c76934c 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -680,9 +680,9 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
if (r < 0)
return log_error_errno(r, "Failed to register object: %m");
- r = sd_bus_request_name(bus, "org.freedesktop.hostname1", 0);
+ r = sd_bus_request_name_async(bus, NULL, "org.freedesktop.hostname1", 0, NULL, NULL);
if (r < 0)
- return log_error_errno(r, "Failed to register name: %m");
+ return log_error_errno(r, "Failed to request name: %m");
r = sd_bus_attach_event(bus, event, 0);
if (r < 0)