[PATCH BlueZ] device: Don't mark services resolved on error

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

 



This fixes a bug where the service UUIDs were not rediscovered after a
failed bonding attempt because the svc_resolved flag remained set even
though the uuids list was empty.
---
 src/device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index bb8e07e8f..e20c2d240 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2591,7 +2591,8 @@ static void device_svc_resolved(struct btd_device *dev, uint8_t browse_type,
 
 	DBG("%s err %d", dev->path, err);
 
-	state->svc_resolved = true;
+	if (err == 0)
+		state->svc_resolved = true;
 
 	/* Disconnection notification can happen before this function
 	 * gets called, so don't set svc_refreshed for a disconnected
-- 
2.18.0




[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