linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] android/hal-sock: Check socket type in connect
@ 2013-11-06 14:03 Andrei Emeltchenko
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Andrei Emeltchenko @ 2013-11-06 14:03 UTC (permalink / raw)
  To: linux-bluetooth

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


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

end of thread, other threads:[~2013-11-07  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 14:03 [PATCH 1/3] android/hal-sock: Check socket type in connect Andrei Emeltchenko
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

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).