2021-04-19 23:39:07

by Miao-chen Chou

[permalink] [raw]
Subject: [BlueZ PATCH v1] device: Reply to connect request if SDP search failed

SDP request can be initiated during BR/EDR connection. This fixes a
missing reply to the method call to prevent generic error message for
no reply.

The following test steps were performed:
(1) Put Bose QC35 into pairing mode, start scanning on bluetoothctl
(2) Turn off the headphones and connect to the headphones
(3) Verify that error should returns immediately to bluetoothctl
---

src/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/src/device.c b/src/device.c
index df440ce09..516ffe2e7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4966,6 +4966,7 @@ static void search_cb(sdp_list_t *recs, int err, gpointer user_data)
{
struct browse_req *req = user_data;
struct btd_device *device = req->device;
+ DBusMessage *reply;
GSList *primaries;
char addr[18];

@@ -5009,6 +5010,18 @@ static void search_cb(sdp_list_t *recs, int err, gpointer user_data)
DEVICE_INTERFACE, "UUIDs");

send_reply:
+ /* If SDP search failed during an ongoing connection request, we should
+ * reply to D-Bus method call.
+ */
+ if (err < 0 && device->connect) {
+ DBG("SDP failed during connection");
+ reply = btd_error_failed(device->connect,
+ strerror(-err));
+ g_dbus_send_message(dbus_conn, reply);
+ dbus_message_unref(device->connect);
+ device->connect = NULL;
+ }
+
device_svc_resolved(device, BROWSE_SDP, BDADDR_BREDR, err);
}

--
2.31.1.368.gbe11c130af-goog


2021-04-20 00:04:43

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,v1] device: Reply to connect request if SDP search failed

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=469903

---Test result---

Test Summary:
CheckPatch PASS 0.32 seconds
GitLint PASS 0.10 seconds
Prep - Setup ELL PASS 44.34 seconds
Build - Prep PASS 0.10 seconds
Build - Configure PASS 7.74 seconds
Build - Make PASS 184.91 seconds
Make Check PASS 8.96 seconds
Make Dist PASS 11.44 seconds
Make Dist - Configure PASS 4.77 seconds
Make Dist - Make PASS 76.05 seconds
Build w/ext ELL - Configure PASS 7.68 seconds
Build w/ext ELL - Make PASS 176.90 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth

2021-04-21 00:04:35

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [BlueZ,v1] device: Reply to connect request if SDP search failed

Hi Miao,

On Mon, Apr 19, 2021 at 5:04 PM <[email protected]> wrote:
>
> 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=469903
>
> ---Test result---
>
> Test Summary:
> CheckPatch PASS 0.32 seconds
> GitLint PASS 0.10 seconds
> Prep - Setup ELL PASS 44.34 seconds
> Build - Prep PASS 0.10 seconds
> Build - Configure PASS 7.74 seconds
> Build - Make PASS 184.91 seconds
> Make Check PASS 8.96 seconds
> Make Dist PASS 11.44 seconds
> Make Dist - Configure PASS 4.77 seconds
> Make Dist - Make PASS 76.05 seconds
> Build w/ext ELL - Configure PASS 7.68 seconds
> Build w/ext ELL - Make PASS 176.90 seconds
>
> Details
> ##############################
> Test: CheckPatch - PASS
> Desc: Run checkpatch.pl script with rule in .checkpatch.conf
>
> ##############################
> Test: GitLint - PASS
> Desc: Run gitlint with rule in .gitlint
>
> ##############################
> Test: Prep - Setup ELL - PASS
> Desc: Clone, build, and install ELL
>
> ##############################
> Test: Build - Prep - PASS
> Desc: Prepare environment for build
>
> ##############################
> Test: Build - Configure - PASS
> Desc: Configure the BlueZ source tree
>
> ##############################
> Test: Build - Make - PASS
> Desc: Build the BlueZ source tree
>
> ##############################
> Test: Make Check - PASS
> Desc: Run 'make check'
>
> ##############################
> Test: Make Dist - PASS
> Desc: Run 'make dist' and build the distribution tarball
>
> ##############################
> Test: Make Dist - Configure - PASS
> Desc: Configure the source from distribution tarball
>
> ##############################
> Test: Make Dist - Make - PASS
> Desc: Build the source from distribution tarball
>
> ##############################
> Test: Build w/ext ELL - Configure - PASS
> Desc: Configure BlueZ source with '--enable-external-ell' configuration
>
> ##############################
> Test: Build w/ext ELL - Make - PASS
> Desc: Build BlueZ source with '--enable-external-ell' configuration

Applied, thanks.

--
Luiz Augusto von Dentz