From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 1/3] android/hal-sock: Check socket type in connect
Date: Wed, 6 Nov 2013 16:03:31 +0200 [thread overview]
Message-ID: <1383746614-15077-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Only RFCOMM sockets are supported in Android.
---
android/hal-sock.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/android/hal-sock.c b/android/hal-sock.c
index 131877a..cd85f1f 100644
--- a/android/hal-sock.c
+++ b/android/hal-sock.c
@@ -83,6 +83,11 @@ static bt_status_t sock_connect(const bt_bdaddr_t *bdaddr, btsock_type_t type,
DBG("uuid %p chan %d sock %p type %d", uuid, chan, sock, type);
+ if (type != BTSOCK_RFCOMM) {
+ error("Socket type %u not supported", type);
+ return BT_STATUS_UNSUPPORTED;
+ }
+
cmd.flags = flags;
cmd.type = type;
cmd.channel = chan;
--
1.7.10.4
next reply other threads:[~2013-11-06 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 14:03 Andrei Emeltchenko [this message]
2013-11-06 14:03 ` [PATCH 2/3] android/daemon: Move include mgmt.h to adapter.h Andrei Emeltchenko
2013-11-06 14:03 ` [PATCH 3/3] android/hal: Rename hal_op_sock_listen to hal_cmd_sock_listen Andrei Emeltchenko
2013-11-07 8:10 ` 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=1383746614-15077-1-git-send-email-Andrei.Emeltchenko.news@gmail.com \
--to=andrei.emeltchenko.news@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).