summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth/bthidd
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2006-11-02 18:57:09 +0000
committeremax <emax@FreeBSD.org>2006-11-02 18:57:09 +0000
commitece06026a549d49227cdd6d5f5d17c6eef3b277b (patch)
treed69c4b20febd31f73ead010c3c8d09eb72fde699 /usr.sbin/bluetooth/bthidd
parent369ac0052b416a6ccd4646d821e5e9f47da763dd (diff)
downloadFreeBSD-src-ece06026a549d49227cdd6d5f5d17c6eef3b277b.zip
FreeBSD-src-ece06026a549d49227cdd6d5f5d17c6eef3b277b.tar.gz
Properly htole16() PSM in sockaddr_l2cap
MFC after: 3 days
Diffstat (limited to 'usr.sbin/bluetooth/bthidd')
-rw-r--r--usr.sbin/bluetooth/bthidd/client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bluetooth/bthidd/client.c b/usr.sbin/bluetooth/bthidd/client.c
index ae06393..59f0d19 100644
--- a/usr.sbin/bluetooth/bthidd/client.c
+++ b/usr.sbin/bluetooth/bthidd/client.c
@@ -45,7 +45,7 @@
#include "bthid_config.h"
#include "bthidd.h"
-static int32_t client_socket(bdaddr_p bdaddr, int32_t psm);
+static int32_t client_socket(bdaddr_p bdaddr, uint16_t psm);
/*
* Get next config entry and create outbound connection (if required)
@@ -212,7 +212,7 @@ client_connect(bthid_server_p srv, int32_t fd)
*/
static int
-client_socket(bdaddr_p bdaddr, int32_t psm)
+client_socket(bdaddr_p bdaddr, uint16_t psm)
{
struct sockaddr_l2cap l2addr;
int32_t s, m;
@@ -243,7 +243,7 @@ client_socket(bdaddr_p bdaddr, int32_t psm)
}
memcpy(&l2addr.l2cap_bdaddr, bdaddr, sizeof(l2addr.l2cap_bdaddr));
- l2addr.l2cap_psm = psm;
+ l2addr.l2cap_psm = htole16(psm);
if (connect(s, (struct sockaddr *) &l2addr, sizeof(l2addr)) < 0 &&
errno != EINPROGRESS) {
OpenPOWER on IntegriCloud