From c77bc38d28b2da11dcd219635205e633b5c0cd28 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 24 Feb 2011 03:23:14 +0100 Subject: [PATCH] job: when cancelling jobs, make sure to propagate this properly to depending jobs --- TODO | 2 ++ src/dbus-job.c | 2 +- src/manager.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index c7ba9fe7f..0f643073d 100644 --- a/TODO +++ b/TODO @@ -19,6 +19,8 @@ F15: * Make systemd-cryptsetup cancellable +* udev should be able to upgrade its database on its own + Features: * introduce simple way to do mandatory conditions diff --git a/src/dbus-job.c b/src/dbus-job.c index 16aa8d071..2a33039bd 100644 --- a/src/dbus-job.c +++ b/src/dbus-job.c @@ -97,7 +97,7 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusConnection *connec if (!(reply = dbus_message_new_method_return(message))) goto oom; - job_free(j); + job_finish_and_invalidate(j, JOB_CANCELED); } else return bus_default_message_handler(j->manager, connection, message, INTROSPECTION, properties); diff --git a/src/manager.c b/src/manager.c index f266aaa01..d77dc0961 100644 --- a/src/manager.c +++ b/src/manager.c @@ -1823,7 +1823,7 @@ void manager_clear_jobs(Manager *m) { transaction_abort(m); while ((j = hashmap_first(m->jobs))) - job_free(j); + job_finish_and_invalidate(j, JOB_CANCELED); } unsigned manager_dispatch_run_queue(Manager *m) { -- 2.30.2