All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] device: Fix Pair method not setting auto_connect
@ 2024-08-29 20:18 Luiz Augusto von Dentz
  2024-08-29 22:01 ` [BlueZ,v1] " bluez.test.bot
  2024-08-30 15:50 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-08-29 20:18 UTC (permalink / raw)
  To: linux-bluetooth

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(+)

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
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v1] device: Fix Pair method not setting auto_connect
  2024-08-29 20:18 [PATCH BlueZ v1] device: Fix Pair method not setting auto_connect Luiz Augusto von Dentz
@ 2024-08-29 22:01 ` bluez.test.bot
  2024-08-30 15:50 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-08-29 22:01 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v1] device: Fix Pair method not setting auto_connect
  2024-08-29 20:18 [PATCH BlueZ v1] device: Fix Pair method not setting auto_connect Luiz Augusto von Dentz
  2024-08-29 22:01 ` [BlueZ,v1] " bluez.test.bot
@ 2024-08-30 15:50 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-08-30 15:50 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-30 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 20:18 [PATCH BlueZ v1] device: Fix Pair method not setting auto_connect Luiz Augusto von Dentz
2024-08-29 22:01 ` [BlueZ,v1] " bluez.test.bot
2024-08-30 15:50 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.