diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-02-15 23:25:53 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-02-15 23:25:53 +0000 |
commit | 2cabb56f7528c9756617dbae8a73d9878bfa9b59 (patch) | |
tree | 8d74bd80284bfd29c3deade6d5342f6dae527a3c /tools | |
parent | 5ff58cb0e277fb4cb4613aa3d2a83e7237c59894 (diff) |
Fix endian problem with hci_create_connection()
Diffstat (limited to 'tools')
-rw-r--r-- | tools/hcitool.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |