aboutsummaryrefslogtreecommitdiffstats
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-04-19 18:21:18 -0700
commite6e12e15f86620aaf4ddb97dceaf15fe91f1e357 (patch)
tree2b89604fb2c39e5649527cfcef53ac897544cfe7
parent89c7774e4f6543f02f40220b21af3f49084c4982 (diff)
binding: bluetooth: discovery_result response refactored
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>
-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 158c005..88b5832 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");
}
/**/