summaryrefslogtreecommitdiffstats
path: root/binding-bluetooth
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-04-19 18:21:10 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-05-14 18:53:56 -0700
commitf8fe756ba386f6805f555d66f0e5739f074727ca (patch)
tree11b5d6c9ac31a99afa278ab2807daf01deb699e7 /binding-bluetooth
parent9fdbe7cf4d10974b9cc51cbb1767a095fb1498bc (diff)
binding: bluetooth: discovery_result response refactoredeel_5.1.0eel_5.0.3eel/5.1.0eel/5.0.35.1.05.0.3eel
Put the json array into a single entry map to make it consistant with other binding APIs and verbs. This also makes libqtappfw access for response data much easier Bug-AGL: SPEC-1385 Change-Id: I2eeb6ead1e386503a765dc1e252c969bb647eeee Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding-bluetooth')
-rw-r--r--binding-bluetooth/bluetooth-api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/binding-bluetooth/bluetooth-api.c b/binding-bluetooth/bluetooth-api.c
index 56248b3..f370f9f 100644
--- a/binding-bluetooth/bluetooth-api.c
+++ b/binding-bluetooth/bluetooth-api.c
@@ -384,6 +384,7 @@ static void bt_discovery_result (struct afb_req request)
return;
}
+ json_object *jresp = json_object_new_object();
json_object *my_array = json_object_new_array();
tmp = list;
@@ -401,7 +402,9 @@ static void bt_discovery_result (struct afb_req request)
adapter_devices_list_free(list);
- afb_req_success(request, my_array, "BT - Scan Result is Displayed");
+ json_object_object_add(jresp, "list", my_array);
+
+ afb_req_success(request, jresp, "BT - Scan Result is Displayed");
}
/**/