diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-02-24 02:36:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-02-24 02:36:34 +0100 |
commit | 5d44db4a905c62d6cf0dfabbf61df49621efec22 (patch) | |
tree | 0bf5cecb59eaf0e55e29a3f0b77fc69ce6f15c55 /src/dbus-job.c | |
parent | ccc80078fe47395ffe0dd48cb6c81551d991ef4b (diff) |
dbus: pass along information why a job failed when it failed (dbus api change!)
Diffstat (limited to 'src/dbus-job.c')
-rw-r--r-- | src/dbus-job.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dbus-job.c b/src/dbus-job.c index 18da72d67a..16aa8d071e 100644 --- a/src/dbus-job.c +++ b/src/dbus-job.c @@ -295,10 +295,10 @@ oom: log_error("Failed to allocate job change signal."); } -void bus_job_send_removed_signal(Job *j, bool success) { +void bus_job_send_removed_signal(Job *j) { char *p = NULL; DBusMessage *m = NULL; - dbus_bool_t b = success; + const char *r; assert(j); @@ -314,10 +314,12 @@ void bus_job_send_removed_signal(Job *j, bool success) { if (!(m = dbus_message_new_signal("/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "JobRemoved"))) goto oom; + r = job_result_to_string(j->result); + if (!dbus_message_append_args(m, DBUS_TYPE_UINT32, &j->id, DBUS_TYPE_OBJECT_PATH, &p, - DBUS_TYPE_BOOLEAN, &b, + DBUS_TYPE_STRING, &r, DBUS_TYPE_INVALID)) goto oom; |