chiark / gitweb /
Prep v220: Use new cgroups functions
[elogind.git] / src / login / logind-session-dbus.c
index d51a6e4bb97aa266a7686696c9b571c157b47822..563153e2d92b64644f35e3c587cbd4da43a71bd3 100644 (file)
@@ -701,6 +701,9 @@ int session_send_create_reply(Session *s, sd_bus_error *error) {
         if (!s->create_message)
                 return 0;
 
+        if (!sd_bus_error_is_set(error) && (s->scope_job || s->user->service_job))
+                return 0;
+
         c = s->create_message;
         s->create_message = NULL;
 
@@ -711,10 +714,9 @@ int session_send_create_reply(Session *s, sd_bus_error *error) {
         if (fifo_fd < 0)
                 return fifo_fd;
 
-        /* Update the session and user state files before we notify
-         * the client about the result. */
+        /* Update the session state file before we notify the client
+         * about the result. */
         session_save(s);
-        user_save(s->user);
 
         p = session_bus_path(s);
         if (!p)