summaryrefslogtreecommitdiff
path: root/android/bluetooth.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-11-04 14:24:45 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-11-04 14:53:04 +0100
commitf91de769487803bad1915d178c6e2dec2eb2cf69 (patch)
tree9caa15a32c471539a3bb727e7e0c52eebfdd42ec /android/bluetooth.c
parent2c4b8bde0fd0d6843bfb88399dccc32e0be85d7f (diff)
downloadbluez-f91de769487803bad1915d178c6e2dec2eb2cf69.tar.gz
android/hal-bluetooth: Add parameter to create_bond
Add parameter to create_bond following new bluetooth.h HAL, transport is defined in bluedroid include/bt_types.h. Bluetooth daemon shall check transport parameter and make needed decisions, by default parameter is unknown and this is the way bluedroid manage it itself.
Diffstat (limited to 'android/bluetooth.c')
-rw-r--r--android/bluetooth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/android/bluetooth.c b/android/bluetooth.c
index 03eb1a115..b627706d5 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -4323,6 +4323,12 @@ static void handle_create_bond_cmd(const void *buf, uint16_t len)
cp.addr.type = select_device_bearer(dev);
bacpy(&cp.addr.bdaddr, &dev->bdaddr);
+ /* TODO: Handle transport parameter */
+ if (cmd->transport > BT_TRANSPORT_LE) {
+ status = HAL_STATUS_INVALID;
+ goto fail;
+ }
+
if (device_is_paired(dev, cp.addr.type)) {
status = HAL_STATUS_FAILED;
goto fail;