X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Funit.c;h=7cd704351cb0e30300cf37436fed9c0c49156cd7;hp=590ca3555a83a655f11f608c211db3de8cae5617;hb=628c89cc68ab96fce2de7ebba5933725d147aecc;hpb=98f738b62047229af4a929d7996e2ab04253b02c diff --git a/src/core/unit.c b/src/core/unit.c index 590ca3555..7cd704351 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -516,7 +516,7 @@ void unit_free(Unit *u) { free(u->cgroup_path); } - set_remove(u->manager->failed_units, u); + manager_update_failed_units(u->manager, u, false); set_remove(u->manager->startup_units, u); free(u->description); @@ -1797,10 +1797,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su } /* Keep track of failed units */ - if (ns == UNIT_FAILED) - set_put(u->manager->failed_units, u); - else - set_remove(u->manager->failed_units, u); + manager_update_failed_units(u->manager, u, ns == UNIT_FAILED); /* Make sure the cgroup is always removed when we become inactive */ if (UNIT_IS_INACTIVE_OR_FAILED(ns)) @@ -2837,7 +2834,6 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) { return -ENOMEM; r = manager_load_unit(u->manager, e, NULL, NULL, &device); - if (r < 0) return r;