chiark / gitweb /
Remove six unused variables and add annotation
[elogind.git] / src / machine / machine-dbus.c
index 243b8604cd960fc34402b7a63202dd0402aa50c1..ceab96e07832d375e3ae801f5dd98002a9edd8a5 100644 (file)
@@ -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();