summaryrefslogtreecommitdiffstats
path: root/binding-bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'binding-bluetooth')
-rw-r--r--binding-bluetooth/bluetooth-api.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/binding-bluetooth/bluetooth-api.c b/binding-bluetooth/bluetooth-api.c
index 8823b23..dfe946c 100644
--- a/binding-bluetooth/bluetooth-api.c
+++ b/binding-bluetooth/bluetooth-api.c
@@ -160,13 +160,17 @@ static json_object *new_json_object_from_device(struct btd_device *BDdevice, uns
{
if (BDdevice->path)
{
+ gchar **str;
+
jstring = json_object_new_string(BDdevice->path);
+ json_object_object_add(jresp, "Path", jstring);
+
+ str = g_strsplit(BDdevice->path, "/", 0);
+ jstring = json_object_new_string(str[3]);
+ g_strfreev(str);
+
+ json_object_object_add(jresp, "Adapter", jstring);
}
- else
- {
- jstring = json_object_new_string("");
- }
- json_object_object_add(jresp, "Path", jstring);
}
if (BD_ADDER & filter)