Diff between 0e12a4bbc935d63c5e430a86c3c599abf57d4018 and 89ca735e57417ec296a41d8c31d0d0d5c66ce2a9

Changed Files

File Additions Deletions Status
src/device.c +4 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index c103bb2..14de7e8 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4080,7 +4080,10 @@ static struct btd_service *probe_service(struct btd_device *device,
 		return NULL;
 	}
 
-	if (profile->auto_connect)
+	/* Only set auto connect if profile has set the flag and can really
+	 * accept connections.
+	 */
+	if (profile->auto_connect && profile->accept)
 		device_set_auto_connect(device, TRUE);
 
 	return service;