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

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

 



From: Joseph Hwang <josephsih@xxxxxxxxxxxx>

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




[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