chiark / gitweb /
sd-dhcp-client: refactor state machine check
[elogind.git] / src / hostname / hostnamed.c
index 36845c4972db9d69c1093276f84e68625d4ee998..e57891bf0d932b365731a623655c7c1f9f59c389 100644 (file)
@@ -574,7 +574,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
                 return r;
         }
 
-        r = sd_bus_request_name(bus, "org.freedesktop.hostname1", SD_BUS_NAME_REPLACE_EXISTING);
+        r = sd_bus_request_name(bus, "org.freedesktop.hostname1", 0);
         if (r < 0) {
                 log_error("Failed to register name: %s", strerror(-r));
                 return r;
@@ -639,14 +639,12 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
-        r = bus_event_loop_with_idle(event, bus, "org.freedesktop.hostname1", DEFAULT_EXIT_USEC);
+        r = bus_event_loop_with_idle(event, bus, "org.freedesktop.hostname1", DEFAULT_EXIT_USEC, NULL, NULL);
         if (r < 0) {
                 log_error("Failed to run event loop: %s", strerror(-r));
                 goto finish;
         }
 
-        r = 0;
-
 finish:
         context_free(&context, bus);