[PATCH v2 BlueZ] core/device: Fix not responding to Connect

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

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

If profile is removed while its connection is pending it may not respond
to Connect method and not cleaning up properly leaving dev->connect set
which will prevent any attempt to connect to the device again.
---
v2: Keep code removing service for the list since it is no garanteed that
device_profile_connected will be called as it depend on the profile state.

 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index 6722976..e76b8bb 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1498,7 +1498,7 @@ static void device_profile_connected(struct btd_device *dev,
 		btd_device_set_temporary(dev, false);
 
 	if (dev->pending == NULL)
-		return;
+		goto done;
 
 	if (!btd_device_is_connected(dev)) {
 		switch (-err) {
-- 
2.4.3

--
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