Skip to content

Commit

Permalink
Pick proper addres type for unknown devices
Browse files Browse the repository at this point in the history
Change-Id: I46641d0fe065b5e5a6620dc34c770429ac8dbe11
  • Loading branch information
Jakub Pawlowski authored and Andre Eisenbach committed Feb 18, 2016
1 parent 0e36a4d commit 0ec558b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions stack/l2cap/l2c_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2219,18 +2219,11 @@ BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb, tBT_TRANSPORT transport)
#endif

#if (BLE_INCLUDED == TRUE)
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;


BTM_ReadDevInfo(p_lcb->remote_bd_addr, &dev_type, &addr_type);

if (transport == BT_TRANSPORT_LE)
{
if (transport == BT_TRANSPORT_LE) {
if (!controller_get_interface()->supports_ble())
return FALSE;

p_lcb->ble_addr_type = addr_type;
p_lcb->ble_addr_type = BTM_IS_PUBLIC_BDA(p_lcb->remote_bd_addr) ? BLE_ADDR_PUBLIC : BLE_ADDR_RANDOM;
p_lcb->transport = BT_TRANSPORT_LE;

return (l2cble_create_conn(p_lcb));
Expand Down

0 comments on commit 0ec558b

Please sign in to comment.