aboutsummaryrefslogtreecommitdiffstats
path: root/binding/network-connman.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/network-connman.c')
-rw-r--r--binding/network-connman.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/binding/network-connman.c b/binding/network-connman.c
index a9e0b74..0e51fa2 100644
--- a/binding/network-connman.c
+++ b/binding/network-connman.c
@@ -383,7 +383,7 @@ json_object *connman_get_properties(struct network_state *ns,
const gchar *path = NULL;
const gchar *key = NULL;
const gchar *basename;
- json_object *jprop = NULL, *jresp = NULL, *jtype = NULL;
+ json_object *jarray = NULL, *jprop = NULL, *jresp = NULL, *jtype = NULL;
gboolean is_config;
pi = connman_get_property_info(access_type, error);
@@ -421,8 +421,11 @@ json_object *connman_get_properties(struct network_state *ns,
g_variant_unref(reply);
jresp = jprop;
} else {
- if (!type_arg)
- jresp = json_object_new_array();
+ if (!type_arg) {
+ jarray = json_object_new_array();
+ jresp = json_object_new_object();
+ json_object_object_add(jresp, "values", jarray);
+ }
g_variant_get(reply, "(a(oa{sv}))", &array);
while (g_variant_iter_loop(array, "(oa{sv})", &path, &array2)) {
@@ -448,7 +451,7 @@ json_object *connman_get_properties(struct network_state *ns,
if (!type_arg) {
json_object_object_add(jtype, "properties", jprop);
- json_object_array_add(jresp, jtype);
+ json_object_array_add(jarray, jtype);
}
}
g_variant_iter_free(array);