[PATCH BlueZ 2/3] adapter: Emit DeviceFound() signal only to discoverable devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bruna Moreira <bruna.moreira@xxxxxxxxxxxxx>

The DeviceFound() signal will only be emitted if the device is
discoverable.
---
 src/adapter.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/adapter.c b/src/adapter.c
index b05a030..d46f3c3 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,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux