diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-04-16 17:12:05 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-04-17 14:15:48 +0300 |
commit | dce0b7df9b6294961e0b355234a87391dc187b1e (patch) | |
tree | 9c0a53dd2fb6d92c780874bac9e4965d2955329c | |
parent | e3f36f586c8f128dd4f696f715640e74d7907bc4 (diff) | |
download | bluez-dce0b7df9b6294961e0b355234a87391dc187b1e.tar.gz |
core/adapter: Create device even if not-connectable
If the device is in fact discoverable it should be no problem to create
a D-Bus object for it as the object is required in order to attach the
advertisement data in case a broadcaster/beacons come in range.
-rw-r--r-- | src/adapter.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/adapter.c b/src/adapter.c index 9de161b3e..5af84898c 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -5373,6 +5373,7 @@ static void update_found_devices(struct btd_adapter *adapter, const bdaddr_t *bdaddr, uint8_t bdaddr_type, int8_t rssi, bool confirm, bool legacy, + bool not_connectable, const uint8_t *data, uint8_t data_len) { struct btd_device *dev; @@ -5501,6 +5502,10 @@ static void update_found_devices(struct btd_adapter *adapter, return; connect_le: + /* Ignore non-connectable events */ + if (not_connectable) + return; + /* * If we're in the process of stopping passive scanning and * connecting another (or maybe even the same) LE device just @@ -5563,15 +5568,12 @@ static void device_found_callback(uint16_t index, uint16_t length, DBG("hci%u addr %s, rssi %d flags 0x%04x eir_len %u", index, addr, ev->rssi, flags, eir_len); - /* Ignore non-connectable events for now */ - if (flags & MGMT_DEV_FOUND_NOT_CONNECTABLE) - return; - confirm_name = (flags & MGMT_DEV_FOUND_CONFIRM_NAME); legacy = (flags & MGMT_DEV_FOUND_LEGACY_PAIRING); update_found_devices(adapter, &ev->addr.bdaddr, ev->addr.type, ev->rssi, confirm_name, legacy, + flags & MGMT_DEV_FOUND_NOT_CONNECTABLE, eir, eir_len); } |