summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-29 19:44:52 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-29 19:45:46 +0200
commit7daa9e6e29b546275566084512ea4e547bc79b91 (patch)
tree099c683a4f630661e983a26cf66de7d3b697c0f8
parent3377af3e2232af58091f664a3223528a1017af72 (diff)
execute: fix bus serialization for commands
-rw-r--r--src/dbus-execute.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dbus-execute.c b/src/dbus-execute.c
index 6ceffc57a7..201f6b596a 100644
--- a/src/dbus-execute.c
+++ b/src/dbus-execute.c
@@ -308,13 +308,14 @@ int bus_execute_append_command(DBusMessageIter *i, const char *property, void *d
assert(i);
assert(property);
- if (!dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(sasbttuii)", &sub))
+ if (!dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(sasbttttuii)", &sub))
return -ENOMEM;
LIST_FOREACH(command, c, c) {
char **l;
uint32_t pid;
int32_t code, status;
+ dbus_bool_t b;
if (!c->path)
continue;
@@ -332,8 +333,10 @@ int bus_execute_append_command(DBusMessageIter *i, const char *property, void *d
code = (int32_t) c->exec_status.code;
status = (int32_t) c->exec_status.status;
+ b = !!c->ignore;
+
if (!dbus_message_iter_close_container(&sub2, &sub3) ||
- !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_BOOLEAN, &c->ignore) ||
+ !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_BOOLEAN, &b) ||
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.start_timestamp.realtime) ||
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.start_timestamp.monotonic) ||
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.exit_timestamp.realtime) ||