From 76e665855edef5b7103cb09d114377d477bfae02 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 26 Jul 2013 18:59:46 +0200 Subject: logind: update the session state file before we send out the CreateSession() reply https://bugs.freedesktop.org/show_bug.cgi?id=67273 --- src/machine/machine-dbus.c | 4 ++++ src/machine/machined-dbus.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/machine') diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 6e1b8f8186..ceab96e078 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -350,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(); diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 6c4d50b3a2..5a016e76bc 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -551,9 +551,8 @@ DBusHandlerResult bus_message_filter( dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result); machine_send_create_reply(mm, &error); } - } - - machine_save(mm); + } else + machine_save(mm); } machine_add_to_gc_queue(mm); -- cgit v1.2.3-54-g00ecf