X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmachine%2Fmachine-dbus.c;h=ceab96e07832d375e3ae801f5dd98002a9edd8a5;hb=8b179a830a789746cce0be6671e2de235e3b0ea9;hp=243b8604cd960fc34402b7a63202dd0402aa50c1;hpb=51da82a781537b275db3fbce8fab8592dd991758;p=elogind.git diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 243b8604c..ceab96e07 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -130,6 +130,7 @@ static const BusProperty bus_machine_machine_properties[] = { { "TimestampMonotonic", bus_property_append_usec, "t", offsetof(Machine, timestamp.monotonic) }, { "Service", bus_property_append_string, "s", offsetof(Machine, service), true }, { "Scope", bus_property_append_string, "s", offsetof(Machine, scope), true }, + { "Leader", bus_property_append_pid, "u", offsetof(Machine, leader) }, { "Class", bus_machine_append_class, "s", offsetof(Machine, class) }, { "State", bus_machine_append_state, "s", 0 }, { "RootDirectory", bus_property_append_string, "s", offsetof(Machine, root_directory), true }, @@ -349,6 +350,10 @@ int machine_send_create_reply(Machine *m, DBusError *error) { return log_oom(); } + /* Update the machine state file before we notify the client + * about the result. */ + machine_save(m); + if (!dbus_connection_send(m->manager->bus, reply, NULL)) return log_oom();