summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-05 02:16:20 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-05 02:16:20 +0200
commit964e0949dd35ecc3fd908de7898b01ab37a13bbb (patch)
tree9d592204d25c4479fa363be050b3b9b5e36bfd31 /src/manager.c
parent27ca8d7a250915b290cf89c195e383a8abab35d5 (diff)
unit: when destructing units make sure we don't readd the unit to the gc queue after we already removed it there
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/manager.c b/src/manager.c
index e37aa83602..38964939c3 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -543,13 +543,24 @@ static void manager_clear_jobs_and_units(Manager *m) {
assert(m);
- manager_dispatch_cleanup_queue(m);
-
while ((j = hashmap_first(m->transaction_jobs)))
job_free(j);
while ((u = hashmap_first(m->units)))
unit_free(u);
+
+ manager_dispatch_cleanup_queue(m);
+
+ assert(!m->load_queue);
+ assert(!m->run_queue);
+ assert(!m->dbus_unit_queue);
+ assert(!m->dbus_job_queue);
+ assert(!m->cleanup_queue);
+ assert(!m->gc_queue);
+
+ assert(hashmap_isempty(m->transaction_jobs));
+ assert(hashmap_isempty(m->jobs));
+ assert(hashmap_isempty(m->units));
}
void manager_free(Manager *m) {