aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-util.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-10-29 17:44:38 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-11-12 03:58:47 -0800
commitf05fd30507b218bd06d6ecdb5ddcd07de3927f82 (patch)
tree76b203898675f8c2388be22d3eca0af9bcd8b690 /binding/bluetooth-util.c
parent3d2a18623f663ddf201f60ef93405b2f03b5f979 (diff)
binding: bluetooth: add BLUEZ_DEFAULT_ADAPTER
Bug-AGL: SPEC-1630 Change-Id: I8e55d273ab58992e6f6327523853c6d330505278 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-util.c')
-rw-r--r--binding/bluetooth-util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/binding/bluetooth-util.c b/binding/bluetooth-util.c
index 3e0303f..f57b43e 100644
--- a/binding/bluetooth-util.c
+++ b/binding/bluetooth-util.c
@@ -1038,13 +1038,10 @@ void json_process_path(json_object *jresp, const char *path) {
}
gchar *return_bluez_path(afb_req_t request) {
- const char *adapter, *device;
+ const char *adapter = afb_req_value(request, "adapter");
+ const char *device;
- adapter = afb_req_value(request, "adapter");
- if (!adapter) {
- afb_req_fail(request, "failed", "No adapter parameter");
- return NULL;
- }
+ adapter = adapter ? adapter : BLUEZ_DEFAULT_ADAPTER;
device = afb_req_value(request, "device");
if (!device) {