diff mbox series

[BlueZ,v1,2/2] adapter: Create devices if they are connectable

Message ID 20240814185714.844117-2-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 9391332938293b37cd29013dde65fdeeec614b5d
Headers show
Series [BlueZ,v1,1/2] device: Promote Device.{AdvertisingData, AdvertisingFlags} to stable | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch warning WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '815f779aa8e4', maybe rebased or not pulled? #99: or not and bluetoothctl has been using it since commit 815f779aa8e4 /github/workspace/src/src/13763849.patch total: 0 errors, 1 warnings, 8 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13763849.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Luiz Augusto von Dentz Aug. 14, 2024, 6:57 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Rather than just depend on discoverable also check if the device is
considered connectable since upper layers shall now be able to use
AdvertisingFlags to detect when a device shall be considered visible
or not and bluetoothctl has been using it since commit 815f779aa8e4
("client: Use AdvertisingFlags when available").
---
 src/adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/adapter.c b/src/adapter.c
index 85ddfc16568f..245de4456868 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7293,7 +7293,7 @@  void btd_adapter_device_found(struct btd_adapter *adapter,
 				MGMT_SETTING_ISO_SYNC_RECEIVER))
 			monitoring = true;
 
-		if (!discoverable && !monitoring && !eir_data.rsi) {
+		if (!discoverable && !monitoring && not_connectable) {
 			eir_data_free(&eir_data);
 			return;
 		}