diff mbox series

[BlueZ,v1] device: Fix Pair method not setting auto_connect

Message ID 20240829201803.1103129-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 39467578207889fd015775cbe81a3db9dd26abea
Headers show
Series [BlueZ,v1] device: Fix Pair method not setting auto_connect | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch warning WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '507ba12483c3', maybe rebased or not pulled? #91: Due to commit 507ba12483c3 ("profile: Remove probe_on_discover") /github/workspace/src/src/13783802.patch total: 0 errors, 1 warnings, 11 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/13783802.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/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz Aug. 29, 2024, 8:18 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Due to commit 507ba12483c3 ("profile: Remove probe_on_discover")
disable_auto_connect may be set when a service is probed but the device
is still temporary which is normally the result of service being
discovered over advertisement rather than connection.

To fix this the Device.Pair method needs to check if the
disable_auto_connect flag has been set and then reset it set auto_connect
which is similar to how Device.Connect works.
---
 src/device.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

bluez.test.bot@gmail.com Aug. 29, 2024, 10:01 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=884907

---Test result---

Test Summary:
CheckPatch                    FAIL      0.63 seconds
GitLint                       PASS      0.28 seconds
BuildEll                      PASS      24.67 seconds
BluezMake                     PASS      1648.16 seconds
MakeCheck                     PASS      13.38 seconds
MakeDistcheck                 PASS      178.87 seconds
CheckValgrind                 PASS      276.23 seconds
CheckSmatch                   PASS      357.27 seconds
bluezmakeextell               PASS      119.89 seconds
IncrementalBuild              PASS      1419.79 seconds
ScanBuild                     PASS      1009.37 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v1] device: Fix Pair method not setting auto_connect
WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '507ba12483c3', maybe rebased or not pulled?
#91: 
Due to commit 507ba12483c3 ("profile: Remove probe_on_discover")

/github/workspace/src/src/13783802.patch total: 0 errors, 1 warnings, 11 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/13783802.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.




---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 30, 2024, 3:50 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 29 Aug 2024 16:18:03 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Due to commit 507ba12483c3 ("profile: Remove probe_on_discover")
> disable_auto_connect may be set when a service is probed but the device
> is still temporary which is normally the result of service being
> discovered over advertisement rather than connection.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] device: Fix Pair method not setting auto_connect
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=394675782078

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index 1a5e8a7caa27..0f18c8c7f54e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3114,6 +3114,11 @@  static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg,
 	 * this in the ATT connect callback)
 	 */
 	if (bdaddr_type != BDADDR_BREDR) {
+		if (device->disable_auto_connect) {
+			device->disable_auto_connect = FALSE;
+			device_set_auto_connect(device, TRUE);
+		}
+
 		if (!state->connected && btd_le_connect_before_pairing())
 			err = device_connect_le(device);
 		else