summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2010-08-07 11:01:08 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-07 18:08:03 +0200
commit4a4d6b4b319915f6108c26455d9807d1c99c8ab6 (patch)
treed6d9857679edb62fa64188ba2d41ae89b3224200 /src/systemctl.c
parent485ccf9a5b68a540d1ee1e09b9dc1ca323b9c15e (diff)
systemctl: fix parsing of DBus reply in 'dot'
"systemctl dot" has been broken since the addition of the "Following=" property.
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 3ca146447a..1844638ba2 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -489,7 +489,7 @@ static int dot(DBusConnection *bus, char **args, unsigned n) {
dbus_message_iter_recurse(&iter, &sub);
while (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_INVALID) {
- const char *id, *description, *load_state, *active_state, *sub_state, *unit_path;
+ const char *id, *description, *load_state, *active_state, *sub_state, *following, *unit_path;
if (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_STRUCT) {
log_error("Failed to parse reply.");
@@ -504,6 +504,7 @@ static int dot(DBusConnection *bus, char **args, unsigned n) {
bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_STRING, &load_state, true) < 0 ||
bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_STRING, &active_state, true) < 0 ||
bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_STRING, &sub_state, true) < 0 ||
+ bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_STRING, &following, true) < 0 ||
bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_OBJECT_PATH, &unit_path, true) < 0) {
log_error("Failed to parse reply.");
r = -EIO;