chiark / gitweb /
update TODO
[elogind.git] / src / login / logind-dbus.c
index 28b5cd49a7a07bd497e522808814a704c0c1f9c3..7e96a04ca70a8a5883a1d2d4695dd0ec734f1d4e 100644 (file)
@@ -2178,7 +2178,7 @@ int manager_start_scope(
                 pid_t pid,
                 const char *slice,
                 const char *description,
-                const char *after,
+                const char *after, const char *after2,
                 sd_bus_error *error,
                 char **job) {
 
@@ -2219,12 +2219,18 @@ int manager_start_scope(
                         return r;
         }
 
-        if (!isempty(description)) {
+        if (!isempty(after)) {
                 r = sd_bus_message_append(m, "(sv)", "After", "as", 1, after);
                 if (r < 0)
                         return r;
         }
 
+        if (!isempty(after2)) {
+                r = sd_bus_message_append(m, "(sv)", "After", "as", 1, after2);
+                if (r < 0)
+                        return r;
+        }
+
         /* cgroup empty notification is not available in containers
          * currently. To make this less problematic, let's shorten the
          * stop timeout for sessions, so that we don't wait
@@ -2356,7 +2362,6 @@ int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, c
 }
 
 int manager_abandon_scope(Manager *manager, const char *scope, sd_bus_error *error) {
-        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
         _cleanup_free_ char *path = NULL;
         int r;
 
@@ -2378,7 +2383,8 @@ int manager_abandon_scope(Manager *manager, const char *scope, sd_bus_error *err
                         NULL);
         if (r < 0) {
                 if (sd_bus_error_has_name(error, BUS_ERROR_NO_SUCH_UNIT) ||
-                    sd_bus_error_has_name(error, BUS_ERROR_LOAD_FAILED)) {
+                    sd_bus_error_has_name(error, BUS_ERROR_LOAD_FAILED) ||
+                    sd_bus_error_has_name(error, BUS_ERROR_SCOPE_NOT_RUNNING)) {
                         sd_bus_error_free(error);
                         return 0;
                 }