chiark / gitweb /
logind: update the session state file before we send out the CreateSession() reply
[elogind.git] / src / machine / machine-dbus.c
index 6e1b8f8186050311c354a4ca5304bd1340be06dd..ceab96e07832d375e3ae801f5dd98002a9edd8a5 100644 (file)
@@ -350,6 +350,10 @@ int machine_send_create_reply(Machine *m, DBusError *error) {
                         return log_oom();
         }
 
                         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();
 
         if (!dbus_connection_send(m->manager->bus, reply, NULL))
                 return log_oom();