summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-03 20:19:58 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-03 20:19:58 +0200
commit8d90c8a8d6867ffcfb61a11b73205cd7b1a72f3a (patch)
treec74c14e9bbd3fdfb0ddeef00a6cfe6d95f1f6026
parent8225488bec7b0e57ea0ca23e2cdc63064bfc48ab (diff)
machine: properly distuingish created and registered machines
-rw-r--r--src/machine/machined-dbus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index ffcd7c026a..a041444b73 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -223,7 +223,6 @@ static int method_create_or_register_machine(Manager *manager, sd_bus_message *m
m->leader = leader;
m->class = c;
m->id = id;
- m->registered = true;
if (!isempty(service)) {
m->service = strdup(service);
@@ -291,6 +290,8 @@ static int method_register_machine(sd_bus *bus, sd_bus_message *message, void *u
goto fail;
}
+ m->registered = true;
+
r = machine_start(m, NULL, error);
if (r < 0)
goto fail;