Diff between dfe8ac32fd5a64d3f544a79a6abe26307aae2696 and 20002d0a371fa01a404b9ebbf0750700201f47b1

Changed Files

File Additions Deletions Status
android/hal-sock.c +5 -0 modified

Full Patch

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;