From 2cabb56f7528c9756617dbae8a73d9878bfa9b59 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 15 Feb 2004 23:25:53 +0000 Subject: Fix endian problem with hci_create_connection() --- tools/hcitool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/hcitool.c b/tools/hcitool.c index 0194b650..675d829e 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -436,7 +436,7 @@ static void cmd_info(int dev_id, int argc, char **argv) bacpy(&cr->bdaddr, &bdaddr); cr->type = ACL_LINK; if (ioctl(dd, HCIGETCONNINFO, (unsigned long) cr) < 0) { - if (hci_create_connection(dd, &bdaddr, HCI_DM1 | HCI_DH1, 0, 0, &handle, 25000) < 0) { + if (hci_create_connection(dd, &bdaddr, htobs(HCI_DM1 | HCI_DH1), 0, 0, &handle, 25000) < 0) { perror("Can't create connection"); close(dd); exit(1); @@ -653,7 +653,7 @@ static void cmd_cc(int dev_id, int argc, char **argv) exit(1); } - if (hci_create_connection(dd, &bdaddr, ptype, 0, role, &handle, 1000) < 0) + if (hci_create_connection(dd, &bdaddr, htobs(ptype), 0, role, &handle, 1000) < 0) perror("Can't create connection"); hci_close_dev(dd); } -- cgit