diff options
Diffstat (limited to 'usr.sbin/bluetooth/bthidd/client.c')
-rw-r--r-- | usr.sbin/bluetooth/bthidd/client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/bthidd/client.c b/usr.sbin/bluetooth/bthidd/client.c index 59f0d19..5f01133 100644 --- a/usr.sbin/bluetooth/bthidd/client.c +++ b/usr.sbin/bluetooth/bthidd/client.c @@ -33,6 +33,7 @@ #include <sys/queue.h> #include <assert.h> +#define L2CAP_SOCKET_CHECKED #include <bluetooth.h> #include <errno.h> #include <fcntl.h> @@ -236,7 +237,9 @@ client_socket(bdaddr_p bdaddr, uint16_t psm) l2addr.l2cap_family = AF_BLUETOOTH; memset(&l2addr.l2cap_bdaddr, 0, sizeof(l2addr.l2cap_bdaddr)); l2addr.l2cap_psm = 0; - + l2addr.l2cap_bdaddr_type = BDADDR_BREDR; + l2addr.l2cap_cid = 0; + if (bind(s, (struct sockaddr *) &l2addr, sizeof(l2addr)) < 0) { close(s); return (-1); |