Thread (3 messages) flat view 3 messages, 2 authors, 2020-08-21
STALE2174d

[PATCH BlueZ] device: unset disconnecting flag when connection is removed

From: Sonny Sasaka <hidden>
Date: 2020-08-21 06:25:32
Subsystem: the rest · Maintainer: Linus Torvalds

From: Joseph Hwang <redacted>

A disconnecting flag has been used to avoid race condition
between the service browsing thread and the disconnecting
thread. We need to unset the flag when connection is removed.

---
 src/device.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/src/device.c b/src/device.c
index 7b7808405..5ab591dd4 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3041,6 +3041,9 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
 							"Paired");
 	}
 
+	if (device)
+		set_client_diconnecting(device->client, false);
+
 	if (device->bredr_state.connected || device->le_state.connected)
 		return;
 
-- 
2.26.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help