summaryrefslogtreecommitdiff
path: root/src/core/dbus-job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-10 22:45:45 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-10 23:03:48 +0100
commit5dd9014faf58bf974352043fbddd3a8e9c3cd9d9 (patch)
tree3f884ee7658732e66ee47ab1ed13a15f36218879 /src/core/dbus-job.c
parentd354315ff7a4e128aea58583a3cbedbf86e69196 (diff)
dbus: duplicate Job.Cancel() as CancelJob() and Snapshot.Remove() as RemoveSnapshot() on the Manager interface
For all other object mehtods there are already counterparts on the manager object, as they help us reduce round-trips. So let's complete this, and reduce complexity on the client side a bit. As a side effect this also makes "systemctl snapshot" without arguments work again.
Diffstat (limited to 'src/core/dbus-job.c')
-rw-r--r--src/core/dbus-job.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/dbus-job.c b/src/core/dbus-job.c
index fdc1dce177..20c2a62338 100644
--- a/src/core/dbus-job.c
+++ b/src/core/dbus-job.c
@@ -101,12 +101,11 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusConnection *connec
if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Job", "Cancel")) {
SELINUX_UNIT_ACCESS_CHECK(j->unit, connection, message, "stop");
+ job_finish_and_invalidate(j, JOB_CANCELED, true);
reply = dbus_message_new_method_return(message);
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
-
- job_finish_and_invalidate(j, JOB_CANCELED, true);
} else {
const BusBoundProperties bps[] = {
{ "org.freedesktop.systemd1.Job", bus_job_properties, j },
@@ -114,7 +113,6 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusConnection *connec
};
SELINUX_UNIT_ACCESS_CHECK(j->unit, connection, message, "status");
-
return bus_default_message_handler(connection, message, INTROSPECTION, INTERFACES_LIST, bps);
}