From: Szymon Janc <szymon.janc@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Bastien Nocera <hadess@hadess.net>, Szymon Janc <szymon.janc@gmail.com>
Subject: [PATCH 4/7] input: Fix connecting new trusted sixaxis device
Date: Wed, 8 Jan 2014 01:02:25 +0100 [thread overview]
Message-ID: <1389139348-3552-5-git-send-email-szymon.janc@gmail.com> (raw)
In-Reply-To: <1389139348-3552-1-git-send-email-szymon.janc@gmail.com>
If sixaxis device was trusted before first connection over Bluetooth
connection might get accepted before device services were discovered.
This results in conection to PSM19 not being added to idev. To fix
this channel for PSM19 is also added to SDP complete callback so that
both channels are added.
---
profiles/input/server.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/profiles/input/server.c b/profiles/input/server.c
index d85d6a9..3814eaf 100644
--- a/profiles/input/server.c
+++ b/profiles/input/server.c
@@ -101,9 +101,6 @@ static void sixaxis_browse_sdp(const bdaddr_t *src, const bdaddr_t *dst,
struct btd_device *device;
struct sixaxis_data *data;
- if (psm != L2CAP_PSM_HIDP_CTRL)
- return;
-
device = btd_adapter_find_device(adapter_find(src), dst);
if (!device)
return;
@@ -112,7 +109,9 @@ static void sixaxis_browse_sdp(const bdaddr_t *src, const bdaddr_t *dst,
data->chan = g_io_channel_ref(chan);
data->psm = psm;
- device_discover_services(device);
+ if (psm == L2CAP_PSM_HIDP_CTRL)
+ device_discover_services(device);
+
device_wait_for_svc_complete(device, sixaxis_sdp_cb, data);
}
--
1.8.5.2
next prev parent reply other threads:[~2014-01-08 0:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 0:02 [PATCH 0/7] sixaxis: Don't mark USB plugged device as trusted Szymon Janc
2014-01-08 0:02 ` [PATCH 1/7] " Szymon Janc
2014-01-08 0:02 ` [PATCH 2/7] input: Fix crash on authorization reply with first sixaxis connection Szymon Janc
2014-01-08 0:02 ` [PATCH 3/7] input: Fix check if device is sixaxis in auth_callback Szymon Janc
2014-01-08 0:02 ` Szymon Janc [this message]
2014-01-08 0:02 ` [PATCH 5/7] client: Add untrust command Szymon Janc
2014-01-08 0:02 ` [PATCH 6/7] client: Add block command Szymon Janc
2014-01-08 0:02 ` [PATCH 7/7] client: Add unblock command Szymon Janc
2014-01-09 15:57 ` [PATCH 0/7] sixaxis: Don't mark USB plugged device as trusted Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389139348-3552-5-git-send-email-szymon.janc@gmail.com \
--to=szymon.janc@gmail.com \
--cc=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox