core/device: Fix not responding to Connect
Luiz Augusto von Dentz
maintainerPATCH v2 1/1 core/device: Fix not responding to Connect
From: Luiz Augusto von Dentz <[email protected]>
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(-)
src/device.c +1 -1
@@ -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) {
Signature · 1 line
2.4.3
Hi,
Quoted 26 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
If profile is removed while its connection is pending it may not respond to Connect method and not cleaning up properly leaving
dev->connectset which will prevent any attempt to connect to the device again.
---
v2: Keep code removing service for the list since it is no garanteed thatdevice_profile_connectedwill be called as it depend on the profile state.src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/device.c +1
-2@@ -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) { --
Quoted 1 line
2.4.3
Applied.
Signature · 1 line
Luiz Augusto von Dentz