From 1923f5dd9068308e880eab5609becc601b41d286 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 23 Feb 2023 16:31:19 -0800 Subject: device: Don't attempt to connect LE if ATT is already connected This checks if an att instance already exists before attempting to connect it once again. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device.c') diff --git a/src/device.c b/src/device.c index d270421cc..cb16d37c1 100644 --- a/src/device.c +++ b/src/device.c @@ -5422,7 +5422,7 @@ int device_connect_le(struct btd_device *dev) char addr[18]; /* There is one connection attempt going on */ - if (dev->att_io) + if (dev->att_io || dev->att) return -EALREADY; ba2str(&dev->bdaddr, addr); -- cgit v1.2.1