---
client/commands.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/client/commands.c b/client/commands.c
index e1d1cd3..c31b794 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -143,12 +143,29 @@ static int cmd_disable(char *args[], int num, struct
option *options)
return 0;
}
+static void state_print(DBusMessageIter *iter, const char *error,
+ void *user_data)
+{
+ DBusMessageIter entry;
+
+ if (error != NULL) {
+ fprintf(stderr, "Error: %s", error);
+ return;
+ }
+
+ dbus_message_iter_recurse(iter, &entry);
+ __connmanctl_dbus_print(&entry, " ", " = ", "\n");
+ fprintf(stdout, "\n");
+}
+
static int cmd_state(char *args[], int num, struct option *options)
{
if (num > 1)
return -E2BIG;
- return list_properties(connection, "GetProperties", NULL);
+ return __connmanctl_dbus_method_call(connection, "/",
+ "net.connman.Manager", "GetProperties",
+ state_print, NULL, DBUS_TYPE_INVALID);
}
static int cmd_services(char *args[], int num, struct option *options)
--
1.7.10.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman