summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-26 18:59:46 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-26 19:03:54 +0200
commit76e665855edef5b7103cb09d114377d477bfae02 (patch)
tree4141612e4ff03505d41ac1fc8e69e8709334c579 /src/login
parente21fea24ae2a7a04f6d5c9d2bbbaf5833d248952 (diff)
logind: update the session state file before we send out the CreateSession() reply
https://bugs.freedesktop.org/show_bug.cgi?id=67273
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-dbus.c5
-rw-r--r--src/login/logind-session-dbus.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index b5e975a9f7..7b9bd201b2 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2368,9 +2368,8 @@ DBusHandlerResult bus_message_filter(
dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
session_send_create_reply(s, &error);
}
- }
-
- session_save(s);
+ } else
+ session_save(s);
}
session_add_to_gc_queue(s);
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 210f7564da..2cc4d8587b 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -592,6 +592,10 @@ int session_send_create_reply(Session *s, DBusError *error) {
return log_oom();
}
+ /* Update the state file before we notify the client about the
+ * result */
+ session_save(s);
+
if (!dbus_connection_send(s->manager->bus, reply, NULL))
return log_oom();