diff options
author | Bruna Moreira <bruna.moreira@openbossa.org> | 2012-07-26 13:37:27 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-07-29 16:52:31 +0200 |
commit | f5c4a04e177676a435ef93b4d8c700af7320e90d (patch) | |
tree | 3f26c933ca2b2547dbca1341490208132989a201 /src | |
parent | d72ba4c9767d1f3a4ad1623dd52a3dbcb5aa9925 (diff) |
adapter: Emit DeviceFound() signal only to discoverable devices
The DeviceFound() signal will only be emitted if the device is
discoverable.
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c index b05a0307..d46f3c31 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2690,6 +2690,11 @@ void adapter_emit_device_found(struct btd_adapter *adapter, if (dev->bdaddr_type != BDADDR_BREDR) { uint16_t app; + /* Avoid emitting DeviceFound() signal if device is not + * discoverable */ + if (!(dev->flags & (EIR_LIM_DISC | EIR_GEN_DISC))) + return; + dev->legacy = FALSE; if (read_remote_appearance(&adapter->bdaddr, &dev->bdaddr, |